Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[compress] Don't set vary header if already set #752

Merged
merged 1 commit into from Feb 19, 2013

Conversation

Projects
None yet
3 participants
Contributor

jonathanong commented Feb 17, 2013

I set res.setHeader('Vary', 'Accept, Accept-Encoding') before compress, and unfortunately I have to reset it again afterwards.

@jonathanong jonathanong [compress] Don't set vary header if already set
I set `res.setHeader('Vary', 'Accept, Accept-Encoding')` before compress, and unfortunately I have to reset it again afterwards.
77b1189

@tj tj added a commit that referenced this pull request Feb 19, 2013

@tj tj Merge pull request #752 from jonathanong/patch-1
[compress] Don't set vary header if already set
94ca983

@tj tj merged commit 94ca983 into senchalabs:master Feb 19, 2013

1 check failed

default The Travis build failed
Details
Contributor

dougwilson commented Feb 19, 2013

compress should probably manipulate the Vary header to add Accept-Encoding if it is not there if Vary was already set instead of skipping it, i.m.o. This way if someone does res.setHeader('Vary', 'Accept') Accept-Encoding will still end up on the Vary header.

Member

tj commented Feb 19, 2013

@dougwilson yeah totally

Contributor

dougwilson commented Feb 19, 2013

@visionmedia I would have just submitted a patch, but just don't have the time at the moment :)

Member

tj commented Feb 19, 2013

Contributor

dougwilson commented Feb 19, 2013

Nice, thank you!

@jonathanong jonathanong deleted the unknown repository branch Feb 20, 2013

Contributor

jonathanong commented Feb 20, 2013

Thanks. That was a better way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment