Comparing version 3.0.1 to 3.1.0
@@ -9,2 +9,3 @@ 'use strict'; | ||
spdy.response = require('./spdy/response'); | ||
spdy.Socket = require('./spdy/socket'); | ||
@@ -11,0 +12,0 @@ // Export client |
@@ -168,8 +168,13 @@ 'use strict'; | ||
var socket = new net.Socket({ | ||
var socketOptions = { | ||
handle: handle, | ||
allowHalfOpen: true | ||
}); | ||
socket.encrypted = true; | ||
}; | ||
var socket; | ||
if (state.secure) | ||
socket = new spdy.Socket(state.socket, socketOptions); | ||
else | ||
socket = new net.Socket(socketOptions); | ||
handle.assignSocket(socket); | ||
@@ -176,0 +181,0 @@ handle.assignClientRequest(req); |
@@ -177,17 +177,18 @@ 'use strict'; | ||
function emulatedCheckContinue(req, res) { | ||
res.writeContinue(); | ||
proto._onStream = function _onStream(stream) { | ||
var state = this._spdyState; | ||
/* jshint validthis: true */ | ||
this.emit('request', req, res); | ||
} | ||
var handle = spdy.handle.create(this._spdyState.options, stream); | ||
proto._onStream = function _onStream(stream) { | ||
var handle = spdy.handle.create(this._spdyState.options, stream); | ||
var socket = new net.Socket({ | ||
var socketOptions = { | ||
handle: handle, | ||
allowHalfOpen: true | ||
}); | ||
socket.encrypted = true; | ||
}; | ||
var socket; | ||
if (state.secure) | ||
socket = new spdy.Socket(stream.connection.socket, socketOptions); | ||
else | ||
socket = new net.Socket(socketOptions); | ||
handle.assignSocket(socket); | ||
@@ -206,3 +207,7 @@ | ||
EventEmitter.listenerCount(this, 'checkContinue') === 0) { | ||
this.once('checkContinue', emulatedCheckContinue); | ||
this.once('checkContinue', function(req, res) { | ||
res.writeContinue(); | ||
this.emit('request', req, res); | ||
}); | ||
} | ||
@@ -209,0 +214,0 @@ |
{ | ||
"name": "spdy", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "Implementation of the SPDY protocol on node.js.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -67,3 +67,6 @@ var assert = require('assert'); | ||
assert(req.isSpdy); | ||
assert(req.socket.encrypted); | ||
if (!plain) { | ||
assert(req.socket.encrypted); | ||
assert(req.socket.getPeerCertificate()); | ||
} | ||
@@ -70,0 +73,0 @@ // Auto-detection |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61553
17
1343
14