[mod_python] 411 Length Required for POST

John Ruff jcruff at gmail.com
Fri Mar 3 12:52:59 EST 2006


Good info, but no, I'm not sending "chunked" data.  I will try HTTP/ 
1.0 anyway and see if the results differ.  Thanks.

___________________
John Ruff
jcruff at gmail.com

"No one can see past a choice they don't understand." --The Oracle



On Mar 3, 2006, at 12:41 PM, Deron Meranda wrote:

> On 3/3/06, John Ruff <jcruff at gmail.com> wrote:
>> I'm using a XMLHttpRequest to send a POST to a mod_python script,  
>> but I'm
>> getting "HTTP/1.x 411 Length Required" back to the browser.  I've  
>> set the
>> 'Content-Length' with my XMLHttpRequest object using
>> [code]request.setRequestHeader('Content-Length',
>> '0')[/code] but doesn't work, this doesn't happen when posting to  
>> a php
>> script.
>
> Are you by any chance sending a "chunked" transfer-encoding?
> Are you sending a large amount of data?
>
> mod_python's FieldStorage classes specifically require a Content- 
> Length
> header when decoding a POST request (and hence can't decode a
> chunked request body).
>
> You may try bumping down to HTTP/1.0 rather than HTTP/1.1, which
> should prevent your request from being chunked.
> --
> Deron Meranda



More information about the Mod_python mailing list