0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-http-304.js
Rich Trott 099cfbc58c test: remove deprecated error logging
common.error() is just deprecated util.error() renamed.
Remove calls to it and some other extraneous console logging
in tests.

PR-URL: https://github.com/nodejs/node/pull/3079
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-07 11:13:38 -07:00

20 lines
521 B
JavaScript

'use strict';
var common = require('../common');
var assert = require('assert');
var http = require('http');
var childProcess = require('child_process');
var s = http.createServer(function(request, response) {
response.writeHead(304);
response.end();
});
s.listen(common.PORT, function() {
childProcess.exec('curl -i http://127.0.0.1:' + common.PORT + '/',
function(err, stdout, stderr) {
if (err) throw err;
s.close();
});
});