
const util = require('util');
const Writable = require('stream').Writable;

function OutgoingResponse(req) {
  Writable.call(this);

  this.socket = req.socket;
}
util.inherits(OutgoingResponse, Writable);


module.exports = OutgoingResponse;

@@ -159,53 +159,755 @@
 et;%0A
-%7D%0Autil.inherits(OutgoingResponse, Writable);%0A
+  this._headers = %7B%7D;%0A%0A  this.finished = false;%0A%7D%0Autil.inherits(OutgoingResponse, Writable);%0A%0AOutgoingResponse.prototype.setHeader = function (name, value) %7B%0A  // TODO check name and value %0A  var key = name.toLowerCase();%0A  this._headers%5Bkey%5D = value;%0A%7D%0A%0AOutgoingResponse.prototype.getHeader = function (name) %7B%0A  if (arguments.length %3C 1) %7B%0A    throw new Error('%22name%22 argument is required for getHeader(name)');%0A  %7D%0A%0A  var key = name.toLowerCase();%0A  return this._headers%5Bkey%5D;%0A%7D%0A%0AOutgoingResponse.prototype.write = function (chunk, encoding, callback) %7B%0A  return this.socket.write(chunk, encoding, callback);%0A%7D%0A%0AOutgoingResponse.prototype.end = function (chunk, encoding, callback) %7B%0A  this.finished = true;%0A  this.socket.end(data, encoding);%0A%7D
 %0A%0Amo

add OutgoingMessage prototype methods