-
-
Notifications
You must be signed in to change notification settings - Fork 858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mention header name error message for invalid header encodings #3400
Comments
Would you be able to review what range of characters the |
From https://github.com/python-hyper/h11/blob/master/h11/_headers.py
So it's essentially direct-quoting from HTTP/1.1 spec, and thus the choice of |
In the main, these sorts of situations are going to happen when using authentication headers, which are often obtained via some sort of "secret management" process that includes encryption/decryption and/or base64 encoding/decoding along the way before such values get injected into actual code. This leaves the door open for upstream human errors to propagate down into this level while not being "obvious" due to the opaque nature of it all. While the example above is very contrived using Cyrillic alphabet, the real error source was more like some bad copy/paste of the correct value. |
Discussed in #3399
Originally posted by RobertCraigie November 12, 2024
This openai-python user ran into a confusing error when passing a non-ascii header value, would it be possible to mention the header name in the error message?
Minimal repro
The text was updated successfully, but these errors were encountered: