You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify LineTooLong error messages with context label
The `LineTooLong` exception now accepts an optional `context` parameter
describing which part of the HTTP message exceeded the size limit
(e.g. `"request URL"`, `"status reason phrase"`, `"header field name"`,
`"header field value"`, `"request/status line"`, `"trailer line"`,
`"chunk size line"`, `"header line with continuations"`, or
`"stream until separator"`). Every `LineTooLong` call site in the pure-Python
parser, the Cython parser, and `StreamReader.readuntil` now passes a
descriptive context.
Fixes the confusing "Status line is too long" error reported in #7177
when the actual issue is a too-long URL.
Co-authored-by: Claude <[email protected]>
0 commit comments