Closed rawler closed 3 years ago
Yeah, as far as I know this ought to work. Would it be easy to make a runnable reproducer? (You can hard-code the strings fed in from the server, so it doesn't require a real network.)
Started looking into it, but not quite sure how to repro using h11 directly. I'm experiencing the issue through httpx though, perhaps I should file the bug there instead?
CC @tomchristie
@rawler By all means, yup. That'll give us a good starting point for tracking down exactly what needs to change, where.
If you've any good tips on quick and easy ways to replicate this that'd be super helpful too. (Wouldn't be too time consuming to pull together a little 1.0 responding service, but if there's any neat shortcuts that'll save us the time of having to do that, then that'd be ace.)
I have spent some time, digging in and trying to figure out what exactly goes wrong here. Will close this ticket, and if I manage to find the time and repro with httpx, post it there instead.
Given a HTTP1.0 server, (with an implicit
Connection: close
), H11 fails with error messagecan't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE
.The response in question is
The state "SEND_RESPONSE" is probably the culprit here. The response and the body is finished (259 bytes body sent), so the state should probably be
IDLE
, notSEND_RESPONSE
.If HTTP1.0 is explicitly not intended to be supported, it should probably be explicitly rejected when seen.