<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=KOI8-R" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks Igor. <br>
<br>
I turned on info and it says the reason is client didn't send
"Content-Length" header. Now, why would Firefox (3) not do that? Is
this common?<br>
<br>
I noticed in Firebug that the header sent ALSO has "Transfer-Encoding:
chunked".<br>
I had the same problem with Lightpd and using a Flash uploader but they
refuse to fix it to ignore chunked, so I could not use it with Flash.
One reason I switched to using nginx is that unlike Lighttpd it works
with the flash uploader. <br>
<br>
So should I just ignore this as it still works as expected?š But I
cannot see content in Firebug, or maybe I need to force a header in JS
code (maybe the mootools JS library mistakenly doesn't set the Content
Length hmm, I should explore that too.) Just a minefield. How is it
that the server returns this error page but also I am getting the JSON
data back as well? <br>
<br>
Chris :)<br>
<br>
<br>
<br>
Igor Sysoev wrote:
<blockquote cite="mid:20080817072406.GB8393@rambler-co.ru" type="cite">
  <pre wrap="">On Sun, Aug 17, 2008 at 02:14:18PM +0700, Chris Savery wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">I've been getting this error a lot in my testing. I never received it 
with Apache. I understand what the message say but not why it's coming 
about. My headers being sent have length. Or is this message referring 
to content returned by PHP at the server end? I'm sure one of you 
experts here knows what's going on with this. I only get it on POST 
requests and not most of my ajax calls (which are GET).

Thanks for any help with tracking this down. I'm seeing it in Firebug 
and when it occurs I cannot see the real response content - even though 
content is indeed returned as well since it has effect on my javascript 
code and updates the screen. Weird.
Chris :)
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Set error_log level to info:

error_log  /path/to/log info;

Then nginx will log a reason. Now there are 3 reasons:

"client sent invalid "Content-Length" header"
"client sent ... method without "Content-Length" header"
"client sent "Transfer-Encoding: chunked" header"

The last reason is nginx feature: it still does not support chunked body.

  </pre>
  <blockquote type="cite">
    <pre wrap="">Response from server:

&lt;html&gt;

&lt;head&gt;&lt;title&gt;411 Length Required&lt;/title&gt;&lt;/head&gt;

&lt;body bgcolor="white"&gt;

&lt;center&gt;&lt;h1&gt;411 Length Required&lt;/h1&gt;&lt;/center&gt;

&lt;hr&gt;&lt;center&gt;nginx/0.6.32&lt;/center&gt;

&lt;/body&gt;

&lt;/html&gt;

Header sent to server using ajax (only removed some identity info, HOST 
line):

User-Agent         Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) 
Gecko/2008072820 Firefox/3.0.1
Accept         text/javascript, text/html, application/xml, text/xml, */*
Accept-Language         en-us,en;q=0.5
Accept-Encoding         gzip,deflate
Accept-Charset         ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive         300
Connection         keep-alive
X-Requested-With         XMLHttpRequest
Content-Type         application/x-www-form-urlencoded; charset=utf-8
Referer         <a class="moz-txt-link-freetext" href="http://www.xxxxx.com/">http://www.xxxxx.com/</a>
Content-Length         269
Cookie         ZZZZSession=3ce34bb3dbc257ff61405175f941f1d7
Pragma         no-cache
Cache-Control         no-cache
    </pre>
  </blockquote>
  <pre wrap=""><!---->

  </pre>
</blockquote>
<br>
</body>
</html>