Thanks Jeff,

It seems the problem is in fact with my proxy, for some reason it
doesn't seem to like X-HTTP-Method-Override headers and simply removes
them. This makes the request look like a regular POST request to _add_
content instead of deleting it.
The problem is, using the real HTTP DELETE method instead of the
override option doesn't work either. Such requests are completely
blocked.
So the question is, is there any way to delete albums or photos
without using any of these mechanisms?

BR
/Henrik

On 26 Sep, 19:17, "Jeff Fisher (Google)" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I was able to get this to work on my test account using curl:
>
> curl -H "Authorization: AuthSub token=\"MY_TOKEN_HERE\"" \
>  -H "X-HTTP-Method-Override: DELETE" \
>  -H "Content-Length: 0" \
> -v -X 
> POSThttp://picasaweb.google.com/data/entry/api/user/USERNAME/albumid/ALBU...
>
> Cheers,
> -Jeff
>
> On Sep 26, 1:24 am, Henrik <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > Content-Length: 0 did not solve the problem for me but I'm starting to
> > think something else may have been broken on my side after all. The
> > response body of the failing request says:
>
> > All POST requests require a Content-length header.
>
> > It seems to me that the request was not identified as a DELETE
> > request, i.e., that the X-HTTP-Method-Override did not work as
> > expected. I'll have to investigate some more.
>
> > Thanks
> > /Henrik
>
> > On 25 Sep, 23:39, "Jeff Fisher (Google)" <[EMAIL PROTECTED]>
> > wrote:
>
> > > It's probably because it's doing a POST and all POSTS are required to
> > > submit a Content-Length header unless you are using chunked transfer-
> > > encoding. I'm not sure why it would have changed recently, but it was
> > > probably when we fixed the POST code to allow for chunked MIME
> > > multipart requests. Can you verify that adding a Content-Length: 0
> > > solves it?
>
> > > Cheers,
> > > -Jeff
>
> > > On Sep 25, 4:23 am, Henrik <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
>
> > > > My code for deleting an album suddenly stopped working a couple of
> > > > days ago. I now get an HTTP 411 "Length required", without changing
> > > > anything in my application. Is this something that was deliberately
> > > > introduced in the API (for example is it a new general requirement
> > > > that all requests should set Content-Length) or is it a bug?
> > > > I mean, a delete request has no body so why should it need a Content-
> > > > Length header?
>
> > > > My request looks something like this:
>
> > > > POSThttp://picasaweb.google.com/data/entry/api/user/<user>/albumid/<albumid>/<version>?authkey=<key>
>
> > > > Authorization: GoogleLogin auth=<token>
> > > > X-HTTP-Method-Override: DELETE
>
> > > > I will try adding "Content-Length: 0" and see if it helps, but even if
> > > > it does, should it really be necessary?
>
> > > > Cheers
> > > > /Henrik
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Picasa-Data-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to