views:

57

answers:

1

i'm sending an http request to the google reader api and getting an unusual response code. following the documentation, i've requested an auth code and included it in the header of every request. after performing the login, and getting an auth code, i tried accessing this url, which is part of the documentation:

http://www.google.com/reader/api/0/stream/items/contents

when i send the request, i get a 411 status code, which is supposed to mean "Length Required". the length, as i've found, is supposed to be the length, in octets, of the message body. there is no message body in this request. there is only a single header, the POST parameter i="item id" and the URL itself. i tried setting the "Content-Length" header to "0" and also to "-1" to no avail.

what's really interesting is that this same code worked fine before google changed their authorization procedure. it's apparent they've changed something else...

so my question is what EXACTLY would cause a 411 response code and how can i prevent it?

+1  A: 

yep HTTP_LENGTH_REQUIRED :S

Read this HTTP Error 411 Length required

Jorgesys