httpx [doesn't accept header value surrounded by whitespace](https://github.com/python-hyper/hyper-h2/blob/13005074d14c7d32f8eaf1683b854446a09d09d3/h2/utilities.py#L265), but other http2 implementations seems to accept them (nghttp2, browsers Firefox, Chrome). Example: ``` async with httpx.Client(http2=True) as client: response = await client.get('https://a.searx.space/headervaluetest') ``` Result : ``` ProtocolError: Received header value surrounded by whitespace b'A value ' ``` The nghttp2 implementation seems here: * https://github.com/nghttp2/nghttp2/blob/bb519154fe62f7ff7e5eb7269e05043dec6d3682/lib/nghttp2_http.c#L332 * https://github.com/nghttp2/nghttp2/blob/bb519154fe62f7ff7e5eb7269e05043dec6d3682/lib/nghttp2_helper.c#L498 I'm not sure if it should be declared as a bug or not.
Activity
lovelydinosaur commentedon Dec 12, 2019
Gotcha. It is a protocol error, but it’d be better if we could prefer robust behaviour over errors. This’ll need filing against the hyper-h2 package.
lovelydinosaur commentedon Dec 13, 2019
I believe #637 resolves this issue. If you're able to confirm that'd be fantastic.
dalf commentedon Dec 13, 2019
@tomchristie Yes this solve the issue.
Thank you !