-
Notifications
You must be signed in to change notification settings - Fork 32
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
Fix WebSocket bug with Firefox #13
base: master
Are you sure you want to change the base?
Conversation
I think this change breaks legitimately passing "upgrade" (i.e. in lower case.) |
Yep - good catch. Try #2... |
Maybe it would be cleaner to just lowercase everything as we pull it in, and do away with these slow case-insensitive functions? Also, you seem to have accidentally snuck in another unrelated change here in the pull request. |
Lowercase all the headers as they come in or just specific headers like "Connection"? Happy to switch over to doing that - it was just more of a global change and I'm not up on all the RFCs to know whether that's legal everywhere or legal/fast on specific headers or what.
Sorry - that should have been in another branch. Moved it over and created another pull request. |
I was thinking maybe just lowercasing a few of the troublesome ones like this one as we tokenize the data. But maybe that's even uglier? Not sure. Looking at your code in the mean while, I think I still see a problem. If |
Is it just whitespace, comma, or nil that could end the token? |
I don't know; I thought the header was supposed to just say "Upgrade" in this case. Can you dig a little in the RFCs and find out? (Sorry; I'm under water with other projects right now.) |
The WebSocket Protocol includes these phrases:
That appears to leave room for tokens other than just Upgrade. For whatever it's worth, the Qt test suite sets Connection to "Upgrade,keepalive". (Which I think is a bug - should be Keep-Alive.) Documention for Connection and Keep-Alive: http://tools.ietf.org/html/rfc2068#section-19.7.1 Token grammar documentation: http://www.packetizer.com/rfc/rfc2616/ I'll go through this when I get unburied a bit... |
Creating Websocket with Firefox v28.0 on Linux was failing because Connection header was "keep-alive, Upgrade" and code was looking for "Upgrade".