Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an nginx 1.0.6 server set up in front of a Ruby on Rails application using Passenger.

I have noticed some strange behaviour when making POST requests. Consider this little code snippet:

I make two identical POST request - the only difference is, that in the last one, the actual post data has 1 more character than the Content-Length specifies (I've inserted a trailing blank).

The first request is responded to fine, but the last one just hangs until my client times out.

Is there any way to configure nginx, so that it can accept both requests? I have no way of making the client behave correctly.

UPDATE: I have just tried to make the same test against another virtual host on the same nginx server, where the backend is PHP. Here it works correctly.

So it is not nginx but Passenger, that is the culprit - still if anyone has had the same problem, please let me know.

/ Carsten

share|improve this question

Have you tried to increase the value of: client_max_body_size ?

share|improve this answer
No because it is default 1 megabyte, and I am only sending 10 bytes – Carsten Gehling Nov 3 '11 at 12:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.