summaryrefslogtreecommitdiffhomepage
path: root/src/nodejs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nodejs/unit-http/websocket_connection.js8
-rw-r--r--src/nodejs/unit-http/websocket_request.js8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/nodejs/unit-http/websocket_connection.js b/src/nodejs/unit-http/websocket_connection.js
index 4eccf6bf..c04075d7 100644
--- a/src/nodejs/unit-http/websocket_connection.js
+++ b/src/nodejs/unit-http/websocket_connection.js
@@ -36,11 +36,11 @@ var idCounter = 0;
function WebSocketConnection(socket, extensions, protocol, maskOutgoingPackets, config) {
this._debug = utils.BufferingLogger('websocket:connection', ++idCounter);
this._debug('constructor');
-
+
if (this._debug.enabled) {
instrumentSocketForDebugging(this, socket);
}
-
+
// Superclass Constructor
EventEmitter.call(this);
@@ -432,8 +432,8 @@ WebSocketConnection.prototype.processFrame = function(frame) {
// logic to emit the ping frame: this is only done when a listener is known to exist
// Expose a function allowing the user to override the default ping() behavior
var cancelled = false;
- var cancel = function() {
- cancelled = true;
+ var cancel = function() {
+ cancelled = true;
};
this.emit('ping', cancel, frame.binaryPayload);
diff --git a/src/nodejs/unit-http/websocket_request.js b/src/nodejs/unit-http/websocket_request.js
index d84e428b..450ab629 100644
--- a/src/nodejs/unit-http/websocket_request.js
+++ b/src/nodejs/unit-http/websocket_request.js
@@ -247,7 +247,7 @@ WebSocketRequest.prototype.parseCookies = function(str) {
WebSocketRequest.prototype.accept = function(acceptedProtocol, allowedOrigin, cookies) {
this._verifyResolution();
-
+
// TODO: Handle extensions
var protocolFullCase;
@@ -418,7 +418,7 @@ WebSocketRequest.prototype.accept = function(acceptedProtocol, allowedOrigin, co
// if (negotiatedExtensions) {
// response += 'Sec-WebSocket-Extensions: ' + negotiatedExtensions.join(', ') + '\r\n';
// }
-
+
// Mark the request resolved now so that the user can't call accept or
// reject a second time.
this._resolved = true;
@@ -447,12 +447,12 @@ WebSocketRequest.prototype.accept = function(acceptedProtocol, allowedOrigin, co
WebSocketRequest.prototype.reject = function(status, reason, extraHeaders) {
this._verifyResolution();
-
+
// Mark the request resolved now so that the user can't call accept or
// reject a second time.
this._resolved = true;
this.emit('requestResolved', this);
-
+
if (typeof(status) !== 'number') {
status = 403;
}