Closed Bug 1690481 Opened 5 years ago Closed 5 years ago

HTTP/1: return a network error for responses with no LF after headers

Categories

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

defect

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: annevk, Assigned: kershaw)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

We have rather scary behavior currently when this happens. In particular, when I modify
fetch/h1-parsing/resources/status-code.py and remove the final newline and then run fetch/h1-parsing/status-code.window.js (as fetch/h1-parsing/status-code.window.html) it returns status codes such as 54976 (where 1 is expected) and if you refresh it will list a different status code there. That suggests that something is rather broken.

Tests: https://github.com/web-platform-tests/wpt/pull/27456. (These don't exhibit the above behavior because they expect a network error, as Safari already does. Chrome does not however, but I suspect they would want to align on at least requiring a single newline.)

Context: https://github.com/whatwg/fetch/issues/472.

Assignee: nobody → kershaw
Severity: -- → S4
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5545af58b161 Make the fetch request fail when response is not available r=baku
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch

Hey Kershaw, is there a follow-up bug for the issue found during review? While the test only found this for fetch(), it seems likely that other code also assumes status is available once the network layer returns a response.

Flags: needinfo?(kershaw)

(In reply to Anne (:annevk) from comment #4)

Hey Kershaw, is there a follow-up bug for the issue found during review? While the test only found this for fetch(), it seems likely that other code also assumes status is available once the network layer returns a response.

Sorry that I forgot to mention I already filed bug 1694361 for this.

Flags: needinfo?(kershaw)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: