Browse Source

Changing http.js to use the same stream.Stream creation as net.js

v0.7.4-release
Micheil Smith 14 years ago
committed by Ryan Dahl
parent
commit
1af52d28ca
  1. 10
      lib/http.js

10
lib/http.js

@ -9,7 +9,7 @@ if (debugLevel & 0x4) {
}
var net = require('net');
var Stream = require('stream').Stream;
var stream = require('stream');
var FreeList = require('freelist').FreeList;
var HTTPParser = process.binding('http_parser').HTTPParser;
@ -185,7 +185,7 @@ var continueExpression = /100-continue/i;
/* Abstract base class for ServerRequest and ClientResponse. */
function IncomingMessage (socket) {
Stream.call(this);
stream.Stream.call(this);
// TODO Remove one of these eventually.
this.socket = socket;
@ -205,7 +205,7 @@ function IncomingMessage (socket) {
this.statusCode = null;
this.client = this.socket;
}
sys.inherits(IncomingMessage, Stream);
sys.inherits(IncomingMessage, stream.Stream);
exports.IncomingMessage = IncomingMessage;
IncomingMessage.prototype._parseQueryString = function () {
@ -282,7 +282,7 @@ IncomingMessage.prototype._addHeaderLine = function (field, value) {
};
function OutgoingMessage (socket) {
Stream.call(this);
stream.Stream.call(this);
// TODO Remove one of these eventually.
this.socket = socket;
@ -301,7 +301,7 @@ function OutgoingMessage (socket) {
this.finished = false;
}
sys.inherits(OutgoingMessage, Stream);
sys.inherits(OutgoingMessage, stream.Stream);
exports.OutgoingMessage = OutgoingMessage;
// This abstract either writing directly to the socket or buffering it.

Loading…
Cancel
Save