Note that this 'expects' is fairly soft and does not go much further than 
"Applications SHOULD use this field to indicate the transfer-length of the 
message-body, unless this is prohibited by the rules... " with the transmission 
rules (keep alive, chunked, etc) beeing the only exceptions overruling this for 
POST (and related). This has always* been a messy problem.

But in general - this is a client bug (it should have been a bit more strict in 
sending) - but arguably the server should (and can) be accomodating in what it 
accepts. So I would try to fix both sides - starting with your own. E.g. a 
simple content-length = $ENV{CONTENT_LENGTH} || 0 sort of thing :).

Thanks,

Dw.
*: 1998 http://arctic.org/~dean/apache/no-content-length/

> -----Original Message-----
> From: Bjoern Hoehrmann [mailto:derhoe...@gmx.net] 
> Sent: 21 April 2009 23:42
> To: Aaron Naiman
> Cc: libwww@perl.org
> Subject: Re: 'POST' method leads to "411 Length Required"
> 
> * Aaron Naiman wrote:
> >$request = new HTTP::Request 'POST', 'http://www.google.com';
> >
> >$response = $ua->request($request);
> 
> You are using POST but are not posting any data, and 
> apparently the server ...
> 
> >An Error Occurred 411 Length Required
> 
> ... expects you to post some data when using POST.
> --
> Björn Höhrmann · mailto:bjo...@hoehrmann.de · 
> http://bjoern.hoehrmann.de Am Badedeich 7 · Telefon: 
> +49(0)160/4415681 · http://www.bjoernsworld.de
> 25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · 
> http://www.websitedev.de/ 
> 

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
                                        

Reply via email to