-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
gh-87497: Explicit that headers sent in camel-case #24661
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
This PR is stale because it has been open for 30 days with no activity. |
If any modification could be required on this PR, feel free to say it to me. |
This PR is stale because it has been open for 30 days with no activity. |
If any modification could be required on this PR, feel free to say it to me. |
Thats not what I get after running b'\n\n\n<meta http-equiv="C... |
@MaxwellDupre The header result is to check in "server side", written by Hope this screen can help: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there unit tests for this behavior? If not, we should add them if we choose to document it.
Doc updated, onboarding unit test process in progress. |
@JelleZijlstra Doc fixed & UT added, let me know if it is OK for you. |
Co-authored-by: Jelle Zijlstra <[email protected]>
Thanks @axel3rd for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
…ase (pythonGH-24661) Co-authored-by: Jelle Zijlstra <[email protected]> (cherry picked from commit 325d6f5) Co-authored-by: Alix Lourme <[email protected]>
GH-91517 is a backport of this pull request to the 3.10 branch. |
GH-91518 is a backport of this pull request to the 3.9 branch. |
…H-24661) Co-authored-by: Jelle Zijlstra <[email protected]> (cherry picked from commit 325d6f5) Co-authored-by: Alix Lourme <[email protected]>
…H-24661) (#91517) Co-authored-by: Jelle Zijlstra <[email protected]> (cherry picked from commit 325d6f5) Co-authored-by: Alix Lourme <[email protected]>
…ase (pythonGH-24661) Co-authored-by: Jelle Zijlstra <[email protected]> (cherry picked from commit 325d6f5) Co-authored-by: Alix Lourme <[email protected]>
Refers: #87497
Currently, the Request sends header keys in Camel case.
This is a choice strategy (no problem with that) and even if headers should be considered insensitively RFC 7230 - 3.2. Header Fields, this is not always the case.
The fact that header keys are "rewritten" (in Camel case) could occurs complexity in troubleshooting (sample).
Having a note/mention about that in documentation would be nice.
Proof
Consider a server which write headers as it:
Check that headers are written as it:
curl --header "x-soMe-hEad: test" http://localhost:8000
Consider a simple usage request call with a custom header
X-SoMe-hEader
:Result is: X-Some-Header: foobar
https://bugs.python.org/issue43331