h11 icon indicating copy to clipboard operation
h11 copied to clipboard

A pure-Python, bring-your-own-I/O implementation of HTTP/1.1

Results 42 h11 issues
Sort by recently updated
recently updated
newest added

Currently h11 accepts a message with both Content-Length and Transfer-Encoding with the latter taking precedence. However [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.3.2) states `A sender MUST NOT send a Content-Length header field in any...

Twisted recently did a CVE fix for CRLF injection in methods and request targets: https://twistedmatrix.com/trac/ticket/9647 We already validate request targets and headers to prevent this kind of nonsense, but AFAICT...

I was looking at https://github.com/shazow/urllib3/pull/1318, and realized I wasn't quite sure what the right rules were for handling whitespace in headers using the "obsolete line-folding rule". Specifically, if we have...

Is there documentation anywhere for the rationale for the design of the `h11` API, specifically how it deviates from other similar projects? I've noticed for example that `h11.Connection` chooses to...

I'm trying to work on an app that communicates with my Samsung TV. After some digging I figured out that the missing status text causes it to not work. ```...

Right now h11 raises a `LocalProtocolError` if you try to send a non-empty `Data` event in response to a HEAD request. This can be a nuisance in a catch-all handler,...

``` import h11 conn = h11.Connection(our_role=h11.CLIENT) conn.send(h11.Request(method='GET', target='/', headers=[('Host', 'foo')])) conn.send(h11.EndOfMessage()) conn.receive_data(b'') try: conn.next_event() except h11.RemoteProtocolError as exc: print(exc.error_status_hint) ``` This prints: ``` 400 ``` The `error_status_hint` might make sense...

This is related to: https://github.com/njsmith/h11/issues/23 Right now, there are two reasons this doesn't happen: * h11 doesn't look at the next request/response cycle at all until the current one finishes...

When either the server or the client sends a HTTP message with a body that is *short* (that is, the body does not contain enough bytes to meet the `Content-Length`...

h11 is in this awkward life stage, where I believe it's basically complete and correct... but it's an unusual API with few precedents, and it hasn't been used much beyond...