Revert "http/https: pass request to .createConnection()"

This reverts commit 53716eb0b5.
This commit is contained in:
Fedor Indutny
2012-07-20 20:51:02 +04:00
parent eb2ca10462
commit e43fe5c833
2 changed files with 11 additions and 17 deletions

View File

@@ -21,8 +21,7 @@
var tls = require('tls');
var http = require('http');
var util = require('util');
var inherits = util.inherits;
var inherits = require('util').inherits;
function Server(opts, requestListener) {
if (!(this instanceof Server)) return new Server(opts, requestListener);
@@ -53,15 +52,15 @@ exports.createServer = function(opts, requestListener) {
// HTTPS agents.
function createConnection(/* [port, host, options] */) {
var options = util._extend({}, this.options);
var options = {};
if (typeof arguments[0] === 'object') {
options = util._extend(options, arguments[0]);
options = arguments[0];
} else if (typeof arguments[1] === 'object') {
options = util._extend(options, arguments[1]);
options = arguments[1];
options.port = arguments[0];
} else if (typeof arguments[2] === 'object') {
options = util._extend(options, arguments[2]);
options = arguments[2];
options.port = arguments[0];
options.host = arguments[1];
} else {