SetProtocol checks that the supplied nsString contains only characters between 0x0020 and 0x007E inclusive . The spec defines valid characters as between 0x0021 and 0x007E inclusive . This likely won't cause any functional issues due to 0x0020 being the space character.  - http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsWebSocket.cpp#1060  - http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07 5.1.10 page 29
That's a good catch - that code is leftover from the -76 implementation when the space was legal. Unfortunately most of our tests use sub-protocols with spaces in them :(
Created attachment 536653 [details] [diff] [review] no spaces 1 1] fixes issue 2] updates existing tests that accidentally violated that clause 3] adds new test that intentionally violates that clause (part of test-5)
Comment on attachment 536653 [details] [diff] [review] no spaces 1 This looks good to me. Sorry I didn't review it earlier; for some reason I got no email about the review request.
6 years ago