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

Test that clients read Upgrade and Connection headers as case-insensitive ASCII #131

Closed
deanveloper opened this issue Aug 24, 2024 · 2 comments

Comments

@deanveloper
Copy link

Under section 4.1: https://datatracker.ietf.org/doc/html/rfc6455#section-4.1

   2.  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_.

   3.  If the response lacks a |Connection| header field or the
       |Connection| header field doesn't contain a token that is an
       ASCII case-insensitive match for the value "Upgrade", the client
       MUST _Fail the WebSocket Connection_.

I made my own autobahn-compliant websocket client but it immediately failed because https://ws.discord.gg/ replies with "Connection: upgrade"

@deanveloper deanveloper changed the title Test that Upgrade and Connection headers are case-insensitive Test that clients read Upgrade and Connection headers as case-insensitive ASCII Aug 24, 2024
@deanveloper
Copy link
Author

deanveloper commented Aug 24, 2024

Autobahn also doesn't seem to test that clients do case-insensitive checks for header names

@oberstet
Copy link
Contributor

oberstet commented Aug 25, 2024

just a few quick comments:

Autobahn also doesn't seem to test that clients do case-insensitive checks for header names

it does: https://github.com/crossbario/autobahn-python/blob/7bc85b34e200640ab98a41cfddb38267f39bc92e/autobahn/websocket/protocol.py#L2697

now, of course this latter behavior is wrt to AutobahnPython (as a WebSocket client) - not the testsuite specifically testing for HTTP headers / opening handshake processing of the WebSocket library implementation.

rgd the latter, pls lets stick to the existing issue #82 ...

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

2 participants