Figured I'd raise this based on some useful real world feedback in https://github.com/encode/httpx/issues/767 which includes a bunch of cases that urllib3 deals with, but h11 (correctly) identifies as protocol errors.
There's four seperate classes of protocol errors mentioned in that ticket...
Multiple Content-Length headers. (Already covered by #92)
Status code outside of valid range. (Returned a "600")
"malformed data" - I believe triggered by a Server: header with no value.
"Receive buffer too long" - Presumably an oversized header or similar but cause wasn't immediately clear.
I'm wondering if you've any thoughts on what (if anything) we might usefully do to have h11 be able to be lenient to some of these protocol errors?
Purely based on the feedback in that particular ticket, and given that #92 already covers one of the cases...
Would it be reasonable to be lenient to invalid status code ranges?
Would it be reasonable to switch the header regex to allow empty values even tho not strictly valid?
Figured I'd raise this based on some useful real world feedback in https://github.com/encode/httpx/issues/767 which includes a bunch of cases that
urllib3
deals with, buth11
(correctly) identifies as protocol errors.There's four seperate classes of protocol errors mentioned in that ticket...
Server:
header with no value.I'm wondering if you've any thoughts on what (if anything) we might usefully do to have
h11
be able to be lenient to some of these protocol errors?Purely based on the feedback in that particular ticket, and given that #92 already covers one of the cases...