-
-
Notifications
You must be signed in to change notification settings - Fork 734
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
Leave rawHeaders case untouched on nock's replies #707
Comments
I agree with your point that In case this goes in, it sounds like a breaking change for a few users that may be relying on |
Yes, that'll be a breaking change. I've updated my PR to fix it for Node 0.10.x. Please take a look at the comment I left there. |
PR merged! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it’s related. Thank you! |
I've noticed that nock is creating
rawHeaders
from the responseheaders
object, which keys are lowercased. This is causingrawHeaders
keys to also be lowercased, which I think is wrong because nock'srawHeaders
may be getting different from the real response'srawHeaders
. I believerawHeaders
case should be returned untouched.This is the code responsible for it on
lib/interceptor.js:62
:Why don't nock builds the
headers
object based on therawHeaders
array? Like thatrawHeaders
would remain untouched andheaders
could still have lowercased keys.What do you think?
The text was updated successfully, but these errors were encountered: