Skip to content

feat(headers): Parse Upgrade header protocols further #499

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

Merged
merged 1 commit into from
May 4, 2015
Merged

feat(headers): Parse Upgrade header protocols further #499

merged 1 commit into from
May 4, 2015

Conversation

pyfisch
Copy link
Contributor

@pyfisch pyfisch commented May 2, 2015

Parses protocols into a name and a value part matching the RFC.
An enum contains all registered or known protocols, but contains
an extension variant.

Closes #480

BREAKING CHANGE: Upgrade header Protocol changed.

"TLS" => ProtocolName::Tls,
"h2c" => ProtocolName::H2c,
_ => {
if let UniCase("websocket") = UniCase(s) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does pattern matching, which will skip UniCase::eq.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true, if let is not needed anyway here.

Parses protocols into a name and a value part matching the RFC.
An enum contains all registered or known protocols, but contains
an extension variant.

Closes #480

BREAKING CHANGE: Upgrade header Protocol changed.
@pyfisch
Copy link
Contributor Author

pyfisch commented May 3, 2015

Updated.

seanmonstar added a commit that referenced this pull request May 4, 2015
feat(headers): Parse Upgrade header protocols further
@seanmonstar seanmonstar merged commit 33146bd into hyperium:master May 4, 2015
@pyfisch pyfisch deleted the upgradeprotocol branch May 16, 2015 10:54
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.

Reminder: Upgrade header Protocols should support version
2 participants