jetti777Ltd / mochiweb

Automatically exported from code.google.com/p/mochiweb
Other
0 stars 0 forks source link

Regression after r116 : Apache used as a proxy returns 400 responses when traffic is low #60

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Set-up Apache as the frontend with mod_proxy and mochiweb as the backend
2. Perform few regular requests per minute

What is the expected output? What do you see instead?
Requests get a 400 result, while they shouldn't.

What version of the product are you using? On what operating system?
The issue was observed with r134 on FreeBSD.

Please provide any additional information below.

The attached patch fixes the problem by first distinguishing initial
timeout (waiting for the request line) and headers timeout, bumping the
initial timeout to 5 minutes (this is not required to fix the issue, but
makes more sense for the use when mochiweb is behind a proxy server that
uses a pool of connections), and more importantly, when the initial receive
request times out, the socket is closed without sending a 400 reply, as it
used to be before r116. Otherwise, I believe the 400 reply is buffered in
Apache and served to the next client.

Original issue reported on code.google.com by pgu...@gmail.com on 20 Jan 2010 at 9:46

Attachments:

GoogleCodeExporter commented 8 years ago
r136

Original comment by bob.ippo...@gmail.com on 20 Jan 2010 at 8:21