29b94290e9
Make sure to start the driver before parsing any body data that arrived with the headers, otherwise we attempt to process frames before the handshake is complete and extensions are negotiated.
James Coglan2015-03-02 22:02:17 +00:00
63e16f6341
Use an empty protocol array rather than 'null'.
James Coglan2015-03-01 10:27:37 +00:00
b192dcb47b
Increasing a timeout during a test since Node 0.12 and io.js seem to take longer than before to emit some events.
James Coglan2015-02-16 23:32:33 +00:00
ebe4ce1382
Because Driver.frame() will now admit input when in readyState 2 (to allow for async extension shutdown), the Messages stream should use the text() and binary() methods that will block messages in that state.
James Coglan2015-02-16 09:51:40 +00:00
76ffac630c
Close cleanly if close() is called before the TCP connection is established.
James Coglan2014-12-21 18:22:03 +00:00
d2abdb1870
Refactor event emitters to make sure errors are only emitted once before the closing procedure is started.
James Coglan2014-12-21 16:46:33 +00:00
f14a49b6eb
Only emit the first error before closing the socket.
James Coglan2014-12-19 08:07:46 +00:00
091d98ef0c
Merge pull request #34 from lpinca/fix/close-on-handshake
James Coglan2014-12-13 00:15:22 +00:00
23675e08ee
Don't expose the internal frame structure of messages to extensions; they should not be able to depend on seeing the actual frame boundaries off the wire because that requires all extensions to leave them intact.
James Coglan2014-12-06 22:08:37 +00:00
8d1f652056
Stylistic tweaks to the Autobahn client.
James Coglan2014-12-06 10:51:18 +00:00
7376f48d6a
Catch errors raised by Extensions.activate().
James Coglan2014-12-02 22:53:16 +00:00
330fa2073d
Don't assume that messages coming out of extensions have anything but the standard websocket-extensions API.
James Coglan2014-11-29 01:54:20 +00:00
58474a837c
Populate the Message.data field before handing off to extensions.
James Coglan2014-11-29 01:13:18 +00:00
82182eb348
Close the Extensions object when ending the session.
James Coglan2014-11-29 00:55:02 +00:00
94041e7a86
websocket-extensions uses Node-style callbacks rather than emitting error events.
James Coglan2014-11-27 09:32:49 +00:00
b779876f07
Handle cases where the socket is closed before being passed to the server
Luigi Pinca2014-11-25 19:27:11 +01:00
e73f7db754
Rename validFrame() to validFrameRsv().
James Coglan2014-11-26 09:59:08 +00:00
0efc0ebb8d
Don't pass the driver into the Extensions constructor.
James Coglan2014-11-25 23:17:39 +00:00
f904131d21
Extract the Extensions class into another module.
James Coglan2014-11-25 21:14:17 +00:00
ee664ba6c9
Decouple Extensions and individual extension libs from the Driver.fail() method, emitting errors instead.
James Coglan2014-11-25 19:42:54 +00:00
538239b761
Move the header-parsing functions into class methods on Extensions.
James Coglan2014-11-25 09:11:58 +00:00
2bc103c781
Adjust the data structures in the Extensions parser so that the server sets the order of extensions, per the spec.
James Coglan2014-11-24 23:03:50 +00:00
eceb59e2fb
Implement the client-side framework for extensions.
James Coglan2014-11-24 22:05:31 +00:00
40341c5439
The Client driver requires the crypto module for generating keys.
James Coglan2014-11-24 00:41:34 +00:00
04eda7bc4f
Allow the user to pass extensions through to websocket-driver via the WebSocket constructor.
James Coglan2014-11-24 00:37:12 +00:00
43ac090594
Add vanilla request support to the proxy server.
James Coglan2014-11-23 21:56:34 +00:00
396637d463
Extract permessage-deflate into a separate module.
James Coglan2014-11-23 21:46:04 +00:00
c986ad231c
Enable strict mode on all source files.
James Coglan2014-11-23 20:09:26 +00:00
ef897eed1c
Implement deflate compression on server-to-client messages.
James Coglan2014-11-23 19:45:02 +00:00
724a5f19a4
Flesh out the parameter validation for extensions, and provide better support for multiple values of extension params and HTTP headers.
James Coglan2014-11-23 15:21:11 +00:00
0332ce2625
Initial support for permessage-deflate, only supports client-to-server compression but enough to pass the Autobahn suite.
James Coglan2014-11-23 13:11:24 +00:00
6146615801
Extract Hybi parser state into Frame and Message structs.
James Coglan2014-11-22 13:34:34 +00:00
2db4ef20ff
Pass in the client certificate for navigating https: proxies in the client example, and log the handshake headers.
James Coglan2014-11-06 23:05:30 +00:00
54cd6f5831
Accientally left part of the proxy tests commented out.
James Coglan2014-11-06 23:04:56 +00:00
4348bec390
Some cleanup to remove bits I left lying around while refactoring proxy support.
James Coglan2014-11-06 23:04:11 +00:00
35d9e6998e
Log the request headers in the example servers, and log all I/O through the proxy server.
James Coglan2014-11-06 09:01:39 +00:00
e649b62396
Replace the old client example with echo_client.js.
James Coglan2014-11-06 08:46:44 +00:00
d0ec17d6a3
Migrate to the new simplified websocket-driver proxy API, and add integration tests for ws: and wss: sockets via an http: proxy.
James Coglan2014-11-05 23:36:00 +00:00
550b3d906d
Unify the proxy handshake, TLS handshake, and WebSocket protocol into a single stream when using driver.proxy() to simplify the API.
James Coglan2014-11-05 23:30:15 +00:00
1d3878e3ed
Remove the stream.resume() call from Client, not needed now that Proxy emits 'close'.
James Coglan2014-10-30 00:36:45 +00:00