1 var common = require('../common');
2 var assert = require('assert');
3 var http = require('http');
4 var url = require('url');
8 process.on('exit', function() {
9 assert.equal(1, request, 'http server "request" callback was not called');
10 assert.equal(1, response, 'http client "response" callback was not called');
13 var server = http.createServer(function(req, res) {
16 }).listen(common.PORT, '127.0.0.1', function() {
17 var opts = url.parse('http://127.0.0.1:' + common.PORT + '/');
19 // remove the `protocol` field… the `http` module should fall back
20 // to "http:", as defined by the global, default `http.Agent` instance.
21 opts.agent = new http.Agent();
22 opts.agent.protocol = null;
24 http.get(opts, function (res) {