-
Notifications
You must be signed in to change notification settings - Fork 233
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
Failed to convert header keys to lower case due to field name conflict: accept-encoding #126
Comments
Sounds like it. Can you give me a code snippet that triggers this issue, and I'll fix the bug. Thanks! |
@monkpow , @oyvindeh I'm hitting this issue too. I cannot tell you how to reproduce it -- express (or possibly helmet which I'm using) is loading up my req.headers by some default behavior... however, i do see where the problem in express-http-proxy is happening. This may be a suitable fix for express-http-proxy index.js line ~83:
Edit: That is short-sighted; does not take into account unique values in this header. Various ways to do this; lodash would be my toolkit, but it does not look like you are including it. |
@oyvindeh @btmurrell I'm tentative about fixing without being able to see the problem in action. If your hunch is right, you should be able to skip this chunk of code by adding
to your options. |
I'm sorry, I haven't had time to write a snippet that triggers the issue. Hopefully, I'll be able to do so next week. |
I have problems reproducing this outside of the environment where I get the error (and I cannot share the full code). But I can confirm that |
I get this error when I use express-http-proxy >= 0.9.1:
I see the release notes for 0.9.1 says "Set 'Accept-Encoding' header to match bodyEncoding". Perhaps something goes wrong in relation to this?
The text was updated successfully, but these errors were encountered: