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

autoRewrite is broken in 1.16 #1103

Closed
apalchys opened this issue Dec 5, 2016 · 7 comments
Closed

autoRewrite is broken in 1.16 #1103

apalchys opened this issue Dec 5, 2016 · 7 comments

Comments

@apalchys
Copy link

apalchys commented Dec 5, 2016

It seems the following commit introduces a bug and "autoRewite" doesn't work properly now: 4edbb62

Method setRedirectHostRewrite changes "location" header, but writeHeaders ignores it and uses rawHeaders instead of headers

@jcrugzz
Copy link
Contributor

jcrugzz commented Dec 5, 2016

@apalchys could you give some more information on whats not working? what changed in the expectations? I apologize if all the conditions were not covered but the same logic is being run but is the value of the header not what is expected?

@apalchys
Copy link
Author

apalchys commented Dec 6, 2016

@jcrugzz you can find more details in a PR opened by @pachirel #1104

@pachirel
Copy link
Contributor

pachirel commented Dec 6, 2016 via email

@apalchys
Copy link
Author

apalchys commented Dec 6, 2016

@pachirel your PR looks good and should fix autoRewrite because it doesn't overwrite header value. thanks.

@pachirel
Copy link
Contributor

pachirel commented Dec 7, 2016

@apalchys 1.16.2 is available. please update and check your app. thanks to @jcrugzz.

@myfancypants
Copy link

I don't know if this would be the right place for feedback but in lib/http-proxy/passes/web-outgoing.js

res.setHeader('Set-Cookie', setCookies.length === 1 ? setCookies[0] : setCookies);

from 1.16.1 prior to the roll back was a breaking change. Our tooling was expecting a consistent array of cookies returned. The return of a string or an array was causing everything to break. Working locally and simply returning

res.setHeader('Set-Cookie', setCookies);

got us back up and operational.

I don't know if this impacts autoRewrite specifically, but figured I could provide some feedback on my own investigations into the matter

@apalchys
Copy link
Author

apalchys commented Dec 8, 2016

@pachirel it works now. thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants