Comparing version 3.3.3 to 3.3.4
@@ -83,3 +83,3 @@ 'use strict'; | ||
status: headers.status ? parseInt(headers.status, 10) : 200, | ||
host: this.socket.parser.incoming.headers.host, | ||
host: this._req.headers.host, | ||
headers: headers.request, | ||
@@ -89,3 +89,3 @@ response: headers.response | ||
var stream = this.socket._handle._spdyState.stream; | ||
var stream = this.spdyStream; | ||
return stream.pushPromise(frame, callback); | ||
@@ -92,0 +92,0 @@ }; |
@@ -240,2 +240,4 @@ 'use strict'; | ||
res._req = req; | ||
handle.assignRequest(req); | ||
@@ -242,0 +244,0 @@ handle.assignResponse(res); |
{ | ||
"name": "spdy", | ||
"version": "3.3.3", | ||
"version": "3.3.4", | ||
"description": "Implementation of the SPDY protocol on node.js.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -18,6 +18,8 @@ # SPDY Server for node.js | ||
var options = { | ||
// Private key | ||
key: fs.readFileSync(__dirname + '/keys/spdy-key.pem'), | ||
cert: fs.readFileSync(__dirname + '/keys/spdy-cert.pem'), | ||
ca: fs.readFileSync(__dirname + '/keys/spdy-ca.pem'), | ||
// Fullchain file or cert file (prefer the former) | ||
cert: fs.readFileSync(__dirname + '/keys/spdy-fullchain.pem'), | ||
// **optional** SPDY-specific options | ||
@@ -24,0 +26,0 @@ spdy: { |
@@ -316,2 +316,27 @@ var assert = require('assert'); | ||
it('should not crash on .push() after socket close', function(done) { | ||
var stream = client.request({ | ||
method: 'POST', | ||
path: '/post' | ||
}, function(err) { | ||
assert(!err); | ||
setTimeout(function() { | ||
client.socket.destroy(); | ||
}, 50); | ||
stream.on('error', function() {}); | ||
stream.end(); | ||
}); | ||
server.on('request', function(req, res) { | ||
req.connection.on('close', function() { | ||
assert.doesNotThrow(function() { | ||
assert.equal(res.push('/push', {}), undefined); | ||
res.end('response'); | ||
}); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
it('should end response after writing everything down', function(done) { | ||
@@ -318,0 +343,0 @@ var stream = client.request({ |
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
60793
17
1385
260