Gallery Remote 500 Error? Read the code.
I’ve been following the dreadfully incomplete and near-incomprehensible documentation on how to access Gallery2 remotely. It’s not SOAP, it’s not REST. It’s custom formatted form submission.
And everything seemed to be working. So I kept going through the checklist of available commands, and then it stopped.
500 server error. No actual diagnosable response.
I’ve updated my Gallery2 install to the current release candidate. I’ve custom built ImageMagick locally. Nothing worked.
Then I came across a small, barely commented bit in gallery2/modules/remote/GalleryRemote.inc — “harmless” get-type operations are permitted. However, anything that attempts to make changes is verified — against a white-list of USERAGENT strings.
I have no idea who considered THAT a security feature, but adding a new USERAGENT to match my C# library’s USERAGENT, and everything suddenly works.
“Open” Source, huh?