Skip to content
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

Duplicated "Content-Type" header on proxy requests #1777

diegossilveira opened this issue Jul 11, 2014 · 0 comments

Duplicated "Content-Type" header on proxy requests #1777

diegossilveira opened this issue Jul 11, 2014 · 0 comments


Copy link

@diegossilveira diegossilveira commented Jul 11, 2014

The endpoint behind a Hapi.js proxy is receiving duplicated "Content-Type" header on the following scenario:

a) settings.passThrough = true
b) the request to the proxy includes a "Content-Type" header

Looking at the code on proxy.js file, I found this:

//proxy.js, line: 54
if (settings.passThrough) {
   options.headers = Hoek.clone(req.headers);

followed by this:

// proxy.js, line: 76
var contentType = req.headers['content-type'];
if (contentType) {
   options.headers['Content-Type'] = contentType;

I think that, if the second section is really needed, it should consider the settings.passThrough option too.

@hueniverse hueniverse added the bug label Jul 14, 2014
@hueniverse hueniverse added this to the 6.1.0 milestone Jul 14, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jan 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants