-
Notifications
You must be signed in to change notification settings - Fork 23.9k
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
uri module enforces Headers in camel-case (explicit the documentation) #73702
Conversation
This is an implementation detail of how python transmits headers. We have no control over this behavior, and since it is an implementation detail which could change, and the RFC states that header names are case insensitive, I don't think this isn't something we should document. |
@sivel : I understand the point of view. But for avoid some lost of time in this kind of troubleshooting (They are written not modified in Perhaps adding a note could be relevant ? ansible/lib/ansible/modules/uri.py Lines 195 to 198 in 11f1177
? |
The problem is that the behavior is dictated by Python, and it's not considered a feature, it's an implementation detail. The behavior is not mentioned at all in the Python docs. Get python to commit to it being a feature, and documenting the behavior, and I'd be open to accepting docs that point to that and convey it here. Basically what I am saying, is that until python commits to that behavior being stable and documents it, we shouldn't either, because it should not be relied on as stable, and could change. |
I will try to manage this strategy/documentation point in Python ecosystem. |
Closing as per the above, please reopen the PR if you get any response back from the CPython team. |
For history: Python bug issue43331 / PR 24661. |
SUMMARY
Origin: adapter-aws-lambda-serverless #62.
uri
module enforce headers written in camel-case, even if filled otherwise (and written as filled in the debug logs).The documentation should explicit that, avoiding tricky troubleshooting.
ISSUE TYPE
COMPONENT NAME
uri
ADDITIONAL INFORMATION
Proof:
Output produced: