No albums listed in response to fetch-albums command

stevepoole

Joined: 2002-10-02
Posts: 3
Posted: Wed, 2002-10-02 05:47

I'm poking at gallery_remote.php manually and am puzzled by something. I use the login command and get a SUCCESS back:

POST /gallery/gallery_remote.php HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 56

cmd=login&protocal_version=1&uname=xxxxx&password=xxxxxx

and then send a fetch-albums command:

POST /gallery/gallery_remote.php HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 35

cmd=fetch-albums&protocal_version=1

which returns SUCCESS but doesn't give me a list of albums. I currently have one album defined in Gallery.

Is this a known problem? Am I being stupid about something?

Thanks!

Steve

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Thu, 2002-10-03 06:15

If you're doing this with curl or something, you can't: session information is stored in a cookie, so what happens is the fetch-albums command thinks you're not logged in (my bet).

 
stevepoole

Joined: 2002-10-02
Posts: 3
Posted: Thu, 2002-10-03 13:52

Ah, I wondered about that. Makes perfect sense.

I was doing this simply by telneting to my http server and constructing the POSTs by hand. This does suggest a minor bug fix, though: if the session information isn't available then I don't think the fetch-albums command should return SUCCESS. Certainly not a big deal when the remote interface is being used properly! :wink:

Steve

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Fri, 2002-10-04 09:16

This is very true. The new version of the interface: gallery_remote2.php will return more accurate error messages.