Re: 'POST' method leads to "411 Length Required"

Aaron Naiman <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
Dear Keary,

Thank you for getting back to me.

Some parts of the HTTP spec are ambiguous and left to implementation. In
> this specific case, error 411 means the server is saying that you are not
> sending a necessary content-length header, which is required for POSt
> requests whether there is any content or not. It may be that LWP doesn't
> provide the header if there is no content. Did you inspect the request to
> verify that the content-length header is indeed being sent?
>
> If the header is indeed being sent, the server might be choking on a 0
> length. Send bogus data to see if that helps.


Initially, I received www.google.com with GET, and "411 Length Required"
with POST.

Subsequently, I tried providing header and content:

     $request = new HTTP::Request 'GET', 'http://www.google.com', [asdf =>
'fdsa'], "dummy content";

and now with GET I see: "411 Length Required", and with POST: "405 Method
Not Allowed".

So, I am pretty baffled as to what the rules are, and how I can make this
work.

Thanx,

Aaron

-- 
Aaron ("Aharon") Naiman
Jerusalem College of Technology--Machon Lev
[email protected]
http://math.jct.ac.il/~naiman
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.