[mod_python] 411 Length Required for POST

John Ruff jcruff at gmail.com
Fri Mar 3 14:03:14 EST 2006

Thanks, actually I'm already using x-www-form-urlencoded originally  
as a test to confirm the header was being set with XMLHtttpRequest's  
setRequestHeader() method (which is it).  But for whatever reason the  
Content-Length is not being set in the POST header.

John Ruff
jcruff at gmail.com

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

On Mar 3, 2006, at 1:32 PM, Nick wrote:

> Also of note, FieldStorage will raise HTTP_NOT_IMPLEMENTED if the
> content-type is not x-www-form-urlencoded or a multipart, which you  
> may
> discover after solving the content-length problem.
> Nick
> John Ruff 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.  I'm using
>> mod_python.publisher as my handler.  Any ideas?

More information about the Mod_python mailing list