From 3546106c43c08aed0f3e45f81f82496c9c51f6b9 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 24 Mar 2010 07:20:56 -0700 Subject: [PATCH] Add req.connection and res.connection --- lib/http.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/http.js b/lib/http.js index 6fc42f0410c..554f047d4b6 100644 --- a/lib/http.js +++ b/lib/http.js @@ -170,7 +170,10 @@ var contentLengthExpression = /Content-Length/i; function IncomingMessage (socket) { events.EventEmitter.call(this); + // TODO Remove one of these eventually. this.socket = socket; + this.connection = socket; + this.httpVersion = null; this.headers = {}; @@ -221,7 +224,9 @@ IncomingMessage.prototype._addHeaderLine = function (field, value) { function OutgoingMessage (socket) { events.EventEmitter.call(this, socket); + // TODO Remove one of these eventually. this.socket = socket; + this.connection = socket; this.output = []; this.outputEncodings = [];