mirror of
https://github.com/nodejs/node.git
synced 2025-05-09 19:38:23 +00:00

PR-URL: https://github.com/nodejs/node/pull/10550 Reviewed-By: Rich Trott <rtrott@gmail.com>
17 lines
376 B
JavaScript
17 lines
376 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const http = require('http');
|
|
|
|
http.createServer(function(req, res) {
|
|
res.end('ok');
|
|
this.close();
|
|
}).listen(0, '127.0.0.1', function() {
|
|
var req = http.request({
|
|
method: 'POST',
|
|
host: '127.0.0.1',
|
|
port: this.address().port,
|
|
});
|
|
req.flush(); // Flush the request headers.
|
|
req.flush(); // Should be idempotent.
|
|
});
|