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

std.http.WebSocket: Make 'upgrade: websocket' check case-insensitive #21391

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

linusg
Copy link
Contributor

@linusg linusg commented Sep 12, 2024

No description provided.

I've seen implementations in the wild that send 'Upgrade: WebSocket',
which currently fails the handshake.

From https://datatracker.ietf.org/doc/html/rfc6455:

"If the response lacks an |Upgrade| header field or the |Upgrade| header
field contains a value that is not an ASCII case-insensitive match for
the value "websocket", the client MUST _Fail the WebSocket Connection_."
@andrewrk
Copy link
Member

andrewrk commented Sep 13, 2024

is it supposed to be case insensitive?

edit: ah, your commit message says it all. not sure why github didn't copy your excellent commit message into the PR body.

@andrewrk andrewrk merged commit e17dfb9 into ziglang:master Sep 13, 2024
10 checks passed
@linusg linusg deleted the websocket-upgrade branch September 13, 2024 09:42
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.

2 participants