wilkie
738a0af1dd
Fix deprecation warning about =~ being called on TrueClass.
...
With the code as it was, it will generate a warning like such:
.../websocket-extensions-0.1.3/lib/websocket/extensions/parser.rb:41:
warning: deprecated Object#=~ is called on TrueClass; it always returns
nil
So we will avoid if the variable is TrueClass.
2019-05-24 14:42:31 +01:00
James Coglan
7ef1451923
Header parser should accept uppercase letters.
2017-11-11 01:04:05 +00:00
James Coglan
cc1d6196fe
Reversing the previous commit; generateResponse() should throw on invalid heders (as should activate()), because the server should fail the connection in this event.
2015-03-26 09:32:54 +00:00
James Coglan
b9da251798
If the header from the client is invalid, just ignore it and build a pipeline with no sessions.
2015-03-14 12:56:48 +00:00
James Coglan
88abae45d2
Make Extensions#close safe to call if @sessions is not yet initialised, in case the socket is closed before handshaking.
2015-02-16 09:54:08 +00:00
Juan M. Cuello
fb23226189
Require 'strscan' to be sure StringScanner will be present.
2014-12-13 21:08:45 -03:00
James Coglan
026721dbdc
Don't delegate valid_frame_rsv to extensions; it's a weird interface and we can figure it out from the extension metadata.
2014-12-12 00:54:13 +00:00
James Coglan
4a093550c2
Prefix extension error messages with the name of the extension.
2014-12-08 00:55:11 +00:00
James Coglan
a993af365f
Allow a ? on the end of #valid_frame_rsv?.
2014-12-02 21:42:37 +00:00
James Coglan
da85aed6b3
Port the Extensions class from websocket-extensions-node.
2014-12-01 20:31:42 +00:00
James Coglan
14d818b602
Implement a parser for the Sec-WebSocket-Extensions header.
2014-12-01 08:18:24 +00:00