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

handle 'upgrade' in comma-separated connection header #691

Merged
merged 3 commits into from
Sep 16, 2014

Conversation

minrk
Copy link
Contributor

@minrk minrk commented Sep 2, 2014

Firefox sends keep-alive, upgrade, not just upgrade, which was being turned into close.

@minrk
Copy link
Contributor Author

minrk commented Sep 2, 2014

closes #690

@indexzero
Copy link
Contributor

This is better fixed with a regular expression.

Firefox sends `keep-alive, upgrade`, not just `upgrade`,
which the proxy incorrectly turned into `close`
@minrk
Copy link
Contributor Author

minrk commented Sep 16, 2014

Thanks, uses a regular expression now.

@jcrugzz
Copy link
Contributor

jcrugzz commented Sep 16, 2014

@minrk only problem I have here is that we will probably leak a socket with keep-alive true and having agent = false but firefox will be the only case.

In regards to the regex, I think you might want .test to get a proper truthy value and to call it on the regex itself. Could you also add a test for this? Appreciate the contribution! :)

@minrk
Copy link
Contributor Author

minrk commented Sep 16, 2014

Uses .test now, and includes a couple of tests.

@jcrugzz
Copy link
Contributor

jcrugzz commented Sep 16, 2014

@minrk excellent, thank you!

jcrugzz added a commit that referenced this pull request Sep 16, 2014
handle 'upgrade' in comma-separated connection header
@jcrugzz jcrugzz merged commit 42c35ae into http-party:master Sep 16, 2014
@indexzero
Copy link
Contributor

Worth noting that the regular expression instance need not be constructed every time. It's a small perf optimization so I'm not sure how meaningful it would be.

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

Successfully merging this pull request may close these issues.

None yet

3 participants