Comparing version 2.0.0-beta6 to 2.0.0-rc1
@@ -24,3 +24,3 @@ 'use strict'; | ||
close: function(callback) { | ||
return self._close(callback); | ||
return self._closeCallback(callback); | ||
} | ||
@@ -51,3 +51,3 @@ }); | ||
Handle.prototype._close = function _close(callback) { | ||
Handle.prototype._closeCallback = function _closeCallback(callback) { | ||
var state = this._spdyState; | ||
@@ -59,2 +59,5 @@ | ||
state.stream.abort(callback); | ||
// Only a single end is allowed | ||
state.ending = false; | ||
}; | ||
@@ -61,0 +64,0 @@ |
@@ -71,3 +71,4 @@ 'use strict'; | ||
var self = this; | ||
this.socket._handle._spdyState.ending = true; | ||
var handle = this.socket._handle; | ||
handle._spdyState.ending = true; | ||
this.socket.end(data, encoding, function() { | ||
@@ -74,0 +75,0 @@ self.constructor.prototype.end.call(self, '', 'utf8', callback); |
{ | ||
"name": "spdy", | ||
"version": "2.0.0-beta6", | ||
"version": "2.0.0-rc1", | ||
"description": "Implementation of the SPDY protocol on node.js.", | ||
@@ -29,3 +29,3 @@ "license": "MIT", | ||
"debug": "^2.2.0", | ||
"handle-thing": "^1.2.3", | ||
"handle-thing": "^1.2.4", | ||
"http-deceiver": "^1.2.4", | ||
@@ -32,0 +32,0 @@ "select-hose": "^2.0.0", |
@@ -266,2 +266,29 @@ var assert = require('assert'); | ||
}); | ||
it('should end response after writing everything down', function(done) { | ||
var stream = client.request({ | ||
method: 'GET', | ||
path: '/post' | ||
}, function(err) { | ||
assert(!err); | ||
stream.on('response', function(status, headers) { | ||
assert.equal(status, 200); | ||
fixtures.expectData(stream, 'hello world, what\'s up?', done); | ||
}); | ||
stream.end(); | ||
}); | ||
server.on('request', function(req, res) { | ||
req.resume(); | ||
res.writeHead(200); | ||
res.write('hello '); | ||
res.write('world'); | ||
res.write(', what\'s'); | ||
res.write(' up?'); | ||
res.end(); | ||
}); | ||
}); | ||
}); | ||
@@ -268,0 +295,0 @@ |
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
53791
1121
Updatedhandle-thing@^1.2.4