Closed Bug 1687903 Opened 4 years ago Closed 10 months ago

Consider returning a network error if status-code cannot be parsed

Categories

(Core :: Networking: HTTP, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: annevk, Assigned: twisniewski)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Currently this exhibits rather unusual behavior, especially for numbers beyond 65535. Safari already does this for numbers with more than three digits.

https://github.com/whatwg/fetch/issues/1142

Severity: -- → N/A
Type: defect → enhancement
Priority: -- → P2
Whiteboard: [necko-triaged]

I have some tests at https://github.com/web-platform-tests/wpt/pull/27421. Safari might be stricter due to not supporting HTTP/0.9 anymore?

Priority: P2 → P3
Assignee: nobody → twisniewski
Status: NEW → ASSIGNED
Blocks: fetch
No longer blocks: interop-2023-url
Pushed by twisniewski@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4e21d241af64
Enable stricter HTTP response status line parsing; r=valentin,necko-reviewers

The failures above are trivial to address, with the fallout being from no longer giving http2/http3 status text a default value. However I'm going to wait for feedback from :jdescottes on the devtools test failure, since for that code I don't know whether we want to provide any default text, or go with what the server literally provides.

Flags: needinfo?(twisniewski)

:jdescottes says it should be fine to just update the tests, as it would be better to be precise about the http2/3 response than add in a default text value, so I'll try landing again today.

Pushed by twisniewski@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/01ca7125a61d
Enable stricter HTTP response status line parsing; r=valentin,necko-reviewers

Ah, it's a shame that I missed that test in my last push. I'll update the patch and try landing one more time today.

Flags: needinfo?(twisniewski)
Pushed by twisniewski@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e5b2c0e8283f
Enable stricter HTTP response status line parsing; r=valentin,necko-reviewers
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
Regressions: 1849641
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: