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
{{ message }}
Repository navigation
httpx does not allow header values with trailing spaces #1640
Activity
uriyyo commentedon May 16, 2021
Hi @yeraydiazdiaz,
Actually, it is not a problem with
httpx.h11library raise this exception so I think this issue should be transferred fromhttpxtoh11.lovelydinosaur commentedon May 17, 2021
So,
h11is raising an error here because trailing spaces in HTTP headers is a spec violation.(I mean, I haven't double checked that yet, but it's almost certainly why)
The first question to ask would be - do you actually need this, and if so why?
Presumably the sensible thing for us to do would be either:
Although I'd be curious to hear if there's any valid use cases where folks actually need the trailing whitespace for some reason.