Nginx calls post body handler with no content?

Hey folks,

Is there something which might cause Nginx to call the post body handler
(set with ngx_http_read_client_request_body) before it actually reads
the body? Maybe like a timeout or something?

I’ve been analyzing traffic with tcpdump, and most of the time, I see:

  1. Headers (with content length)
  2. Body (of content length size)
  3. Response

but sometimes my handler gets a garbled buffer, and when I look in the
tcpdump log I see:

  1. Headers (with content length)
  2. Response (an error since it doesn’t have the body)
  3. Response Body
  4. An error for the response body because it thinks it’s a request that
    doesn’t make sense.

I thought if maybe there was a timeout set somewhere, it returns without
actually reading the request (if it was slow in coming) for some reason.
But I can’t find a setting for anything like that anywhere.

If you have any advice, let me know! Thanks.

Posted at Nginx Forum:,55098,55098#msg-55098