Repository navigation
fix(http): give HTTP's version, data, start-line and settings errors the HTTP: prefix (#2298) - #2373
Conversation
|
Review: NEEDS CHANGES at
Confirmed correct: every other touched site (version/data/version-guess in |
…the HTTP: prefix (#2298) Problem: http.HTTP's version, data and version-guess errors, httpv1.HTTP._make_start_line's errors, and httpv2.HTTP._make_http_settings's rejection all broke the house "<prefix>: <lowercase description>: ... {value!r}" form -- missing or malformed prefixes, capitalised with a full stop, and some without the rejected values. Fix: reword them as "HTTP: invalid version: 3", "HTTP: invalid data: ...", "HTTP: unknown version", "HTTP: invalid start line: ..." (naming the method and status it got), and "HTTP/2: [Type 4] invalid settings: 42" (dropping the stray space before the colon and adding the rejected value). Test: test_http_message_prefix_2298_unit pins each message, including the settings one; the existing pins in test_http_unit, test_http_guess_http2_1141_unit and test_http_from_data_1154_unit follow the new text.
28ec382 to
336ea4a
Compare
|
Rebased and amended |
|
Review: GOOD TO GO at All findings across both rounds now addressed. |
|
Coverage: 91.58% (unit tier, Python 3.15,
Per-file detail: the |
|
Ready to merge. Review: GOOD TO GO (Sonnet, round 2) at |
make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix — bug fixDescription
Closes #2298.
http.HTTP's version, data and version-guess errors,httpv1.HTTP._make_start_line's errors, andhttpv2.HTTP._make_http_settings's rejection all broke the house<prefix>: <lowercase description>: … {value!r}form — missing or malformed prefixes, capitalised with a full stop, and some without the rejected values.HTTP: invalid version: 3,HTTP: invalid data: …,HTTP: unknown version,HTTP: invalid start line: …(naming the method and status it got), andHTTP/2: [Type 4] invalid settings: 42(dropping the stray space before the colon and adding the rejected value).test_http_message_prefix_2298_unitpins each message, including the settings one; the existing pins intest_http_unit,test_http_guess_http2_1141_unitandtest_http_from_data_1154_unitfollow the new text.