Open Bug 1029493 Opened 10 years ago Updated 3 years ago

Firefox not properly responding to the closure of the server connection per RFC (408 response)

Categories

(Core :: Networking: HTTP, defect, P5)

30 Branch
x86
macOS
defect

Tracking

()

UNCONFIRMED

People

(Reporter: benedikt.hug, Unassigned)

Details

(Whiteboard: [necko-backlog])

Attachments

(2 files)

Attached file tcpdump.pcap
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140605174243

Steps to reproduce:

-Visit http://www.godmode-trader.de/
-Open the network analysis tool in firefox to see when 408 responses show up
-Press F5 until the upper part of the advertisment is not visible anymore (the area is marked red on attached Screenshot_1) and the network analysis shows a 408 response (marked green).
-It can take up to 20 reloads until the error occurs


Actual results:

Firefox does not properly respond to the closure of the server connection per RFC if the closure also contains an HTTP response, and does not properly handle re-sending the request through a working connection, instead incorrectly assuming that the error response is the response to a newly sent request.
Attached is a tcpdump in which the behaviour described has been recored.


Expected results:

Realize that the connection has been closed by the server and don't give the user the 408 error as the apparent result of their request.

Chrome had exactly the same bug ( http://code.google.com/p/chromium/issues/detail?id=377581 ) which has been resolved in the mean time.
Attached image Screenshot_1.jpg
Component: Untriaged → Networking: HTTP
Product: Firefox → Core
fwiw that 408 violates the basic HTTP BNF which doesn't have a concept of a response without a request. (It says that a server responds after receiving and interpreting a request message)

nonetheless there is code that tries to deal with it - so your testcase is appreciated. Its no doubt because of the TCP RST that is generated as part of it.
According to http://tools.ietf.org/html/rfc7230#section-3.4 the server may respond to an incomplete request (and not sending anything is an incomplete request) with an error message prior to closing the connection. This is exactly what the server does. So I do not think the server violates the protocol.
(In reply to Birger Brunswiek from comment #3)
>(and not sending anything is an incomplete
> request)

no :)
(In reply to Patrick McManus [:mcmanus] from comment #4)
> (In reply to Birger Brunswiek from comment #3)
> >(and not sending anything is an incomplete
> > request)
> 
> no :)

Well then you have a different interpretation of what incomplete is. I stick with mine unless there's a specific place in the RFC that says otherwise.
Whiteboard: [necko-backlog]
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P1
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: P1 → P3

Bulk-downgrade of unassigned, untouched DOM/Storage bug's priority.

If you have reason to believe, this is wrong, please write a comment and ni :jstutte.

Severity: normal → S4
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: