[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#677086: apache2-mpm-prefork: apache2 sends "400 bad request" on POST from some firefox browsers



From the dump you uploaded, increasing mod_reqtimeout's timeouts could
also help as a workaround.
I am not sure why increasing mod_reqtimeout's should work. Using 2.2.22
FF sends continuously data and using 2.2.16 FF didn't send anything for
more than 20 seconds. I don't think that FF will start sending data after
waiting for more than 20 seconds. But nevertheless I will try to get
test results with higher timeouts configured.
The test with apache 2.2.16 configured with:
reqtimeout.conf: RequestReadTimeout header=40-60,minrate=500
results also in a "400 Bad Request" but only after 40 seconds, as expected.
http://uploadtest.puzzleandplay.de/capture-a2-2-16-reqtimeout-40.png (screenshot) http://uploadtest.puzzleandplay.de/capture-a2-2-16-reqtimeout-40.cap (capture)

Here are two captures from an upload of a 512K large testfile:
2.2.16: http://uploadtest.puzzleandplay.de/capture-a2-2-16-512K.cap
2.2.22: http://uploadtest.puzzleandplay.de/capture-a2-2-22-512K.cap

The 2.2.16 dump was done with Firefox 12, the 2.2.22 dump with Firefox
13. Retry with identical clients.
Vice versa. The 2.2.16 dump was done with Firefox 13, the 2.2.22 dump with FF 12. Both tests were done from the same machine but the 2.2.22 capture is older. Thats the reason for the different versions.

Here are two captures from yesterday. In each capture a 480K large testfile was uploaded with FF 13 from the same machine. (RequestReadTimeout header=40-60,minrate=500)
2.2.16 (same as above!):
http://uploadtest.puzzleandplay.de/capture-a2-2-16-reqtimeout-40.cap (capture) http://uploadtest.puzzleandplay.de/capture-a2-2-16-reqtimeout-40.png (screenshot)

2.2.22:
http://uploadtest.puzzleandplay.de/capture-a2-2-22-reqtimeout-40.cap (capture) http://uploadtest.puzzleandplay.de/capture-a2-2-22-reqtimeout-40.png (screenshot)

The same behavior as with Firefox 12 (or older versions). But I found a very very important thing:

Nothing seems to be relevant besides the "send 408 instead of 400 on
timeout". Maybe firefox automatically retries on 408, but doesn't on
400?
In my opinion, the failure occurs much earlier. Firefox doesn't even
start the upload of the file when 2.2.16 is used! (see wireshark
captures later in this mail)
We are both right. When using 2.2.22 the FIRST try of Firefox FAILS with error "408 Request Time-out". It seems that Firefox then makes a retry (as supposed by you). The same is also true for Firefox 12 (and older versions I guess). And because of the returned error code 400 instead of 408 in 2.2.16 the retry mechanism in Firefox does not work! That's the reason why an upload is possible with 2.2.22 and not possible with 2.2.16.

- Apply this patch to 2.2.16 and see if it helps:
http://svn.apache.org/viewvc?view=revision&revision=1100200
Applying the patch will only change the error code in frame 6 (2.2.16)
from 400 to 408. IMHO the frame 4 (2.2.16) is already the problem.
The behavior of Firefox in frame 4 seems to be a bug in Firefox. But changing the error code from 400 to 408 seems to be a perfect workaround for this Firefox bug.

Can you apply this patch in the official debian squeeze stable release?



Reply to: