-
Notifications
You must be signed in to change notification settings - Fork 373
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
Header case-sensitivity? #90
Comments
Afraid not. From RFC 2616 - "Hypertext Transfer Protocol -- HTTP/1.1", paragraph 4.2, "Message Headers":
|
It occurs to me when rereading this I may have misunderstood your issue, in which case feel free to reopen with some code to reproduce the issue. |
I have a unique server that transmits Edit: EDIT 2:
I think this means values such as http/client.py#L755 It looks like at least one version of |
Yeah, VCR is treating headers as case-insensitive (in accordance with RFC2616) and is normalizing them (by lowercasing them) before storing them in the cassette. That's why it's "fixing" the problem for you. |
I wrote a test that's currently failing to illustrate why this might be an issue: hartsock@a86a3f7 ... I'm not 100% certain what the correct behavior should be in this circumstance but it looks like based on the headers.py#L90 reference above vcrpy might need to lower case the name used with |
I think you're right. I'll try to look into it more this weekend, but I would like VCR to be as transparent as possible when patching out httplib, including the behavior of getheader().
|
cookie = resp.getheader('Set-Cookie')
versuscookie = resp.getheader('set-cookie')
My HTTP client library under python 2 used
getheader('set-cookie')
this returnsNone
when using VCRpy. Practical testing seems to indicate that in production thegetheader
method is case insensitive.Is this a bug?
The text was updated successfully, but these errors were encountered: