[mod_python] 411 Length Required for POST

Deron Meranda deron.meranda at gmail.com
Fri Mar 3 14:54:38 EST 2006


On 3/3/06, John Ruff <jcruff at gmail.com> wrote:
>      xmlHttp.open("POST", url, true);
>      xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-
> urlencoded')
>      xmlHttp.setRequestHeader('Content-length', '0');
>      xmlHttp.send(null);

You're not sending any body!  Even if there's nothing to
send, try sending '' rather than null.  I'm guessing that the
XMLHttpRequest implementation is just not sending a
Content-Length if you send null.

It's also very unusual to use application/x-www-form-urlencoded
with POST's, but I guess you could.  Note thogh that in that case
the "URL" should be in the request body, not the actual
URL you're POSTing to.
--
Deron Meranda



More information about the Mod_python mailing list