- 2012.01.06, Version 0.6.7 (stable)
+2012.01.16, Version 0.7.0 (unstable)
+
+* Upgrade V8 to 3.8.6
+
+* Use GYP build system on unix (Ben Noordhuis)
+
+* Experimenetal isolates support (Ben Noordhuis)
+
+* Improvements to Cluster API (Andreas Madsen)
+
+* Use isolates for internal debugger (Fedor Indutny)
+
+* Bug fixes
+
+
+ 2012.01.19, Version 0.6.8 (stable)
+
+ * Update V8 to 3.6.6.19
+
+ * Numeric key hash collision fix for V8 (Erik Corry, Fedor Indutny)
+
+ * Add missing TTY key translations for F1-F5 on Windows (Brandon Benvie)
+
+ * path.extname bugfix with . and .. paths (Bert Belder)
+
+ * cluster: don't always kill the master on uncaughtException (Ben Noordhuis)
+
+ * Update npm to 1.1.0-2 (isaacs)
+
+ * typed arrays: set class name (Ben Noordhuis)
+
+ * zlib binding cleanup (isaacs, Bert Belder)
+
+ * dgram: use slab memory allocator (Michael Bernstein)
+
+ * fix segfault #2473
+
+ * #2521 60% improvement in fs.stat on Windows (Igor Zinkovsky)
+
+
+ 2012.01.06, Version 0.6.7 (stable), d5a189acef14a851287ee555f7a39431fe276e1c
* V8 hash collision fix (Breaks MIPS) (Bert Belder, Erik Corry)
var ret = parser.execute(d, start, end - start);
if (ret instanceof Error) {
debug('parse error');
+ freeParser();
socket.destroy(ret);
} else if (parser.incoming && parser.incoming.upgrade) {
+ // Upgrade or CONNECT
var bytesParsed = ret;
- socket.ondata = null;
- socket.onend = null;
-
var res = parser.incoming;
req.res = res;
+ socket.ondata = null;
+ socket.onend = null;
+ parser.finish();
+ parsers.free(parser);
+
// This is start + byteParsed
- var upgradeHead = d.slice(start + bytesParsed, end);
- if (req.listeners('upgrade').length) {
- // Emit 'upgrade' on the Agent.
- req.upgraded = true;
- req.emit('upgrade', res, socket, upgradeHead);
+ var bodyHead = d.slice(start + bytesParsed, end);
+
+ var eventName = req.method === 'CONNECT' ? 'connect' : 'upgrade';
+ if (req.listeners(eventName).length) {
+ req.upgradeOrConnect = true;
+
+ // detach the socket
socket.emit('agentRemove');
+ socket.removeListener('close', closeListener);
+ socket.removeListener('error', errorListener);
+
+ req.emit(eventName, res, socket, bodyHead);
+ req.emit('close');
} else {
- // Got upgrade header, but have no handler.
+ // Got Upgrade header or CONNECT method, but have no handler.
socket.destroy();
}
+ freeParser();
+ } else if (parser.incoming && parser.incoming.complete) {
+ freeParser();
}
};
SecurePair.prototype.destroy = function() {
+ if (this._doneFlag) {
+ return;
+ }
+
var self = this;
- var error = this.ssl.error;
- if (!this._doneFlag) {
- this._doneFlag = true;
- this.ssl.error = null;
- this.ssl.close();
- this.ssl = null;
+ this._doneFlag = true;
+ this.ssl.error = null;
+ this.ssl.close();
+ this.ssl = null;
- self.encrypted.writable = self.encrypted.readable = false;
- self.cleartext.writable = self.cleartext.readable = false;
+ self.encrypted.writable = self.encrypted.readable = false;
+ self.cleartext.writable = self.cleartext.readable = false;
- process.nextTick(function() {
- self.cleartext.emit('end');
- self.encrypted.emit('close');
- self.cleartext.emit('close');
- });
- }
+ process.nextTick(function() {
+ self.cleartext.emit('end');
+ self.encrypted.emit('close');
+ self.cleartext.emit('close');
+ });
+ };
+
+ SecurePair.prototype.error = function() {
if (!this._secureEstablished) {
+ var error = this.ssl.error;
if (!error) {
error = new Error('socket hang up');
error.code = 'ECONNRESET';