2015-05-19 13:00:06 +02:00
|
|
|
'use strict';
|
2014-04-09 15:02:03 +02:00
|
|
|
var common = require('../common');
|
|
|
|
var http = require('http');
|
|
|
|
|
|
|
|
http.createServer(function(req, res) {
|
|
|
|
res.end('ok');
|
|
|
|
this.close();
|
2014-05-02 11:22:19 -04:00
|
|
|
}).listen(common.PORT, '127.0.0.1', function() {
|
2014-04-09 15:02:03 +02:00
|
|
|
var req = http.request({
|
|
|
|
method: 'POST',
|
2014-05-02 11:22:19 -04:00
|
|
|
host: '127.0.0.1',
|
|
|
|
port: common.PORT,
|
2014-04-09 15:02:03 +02:00
|
|
|
});
|
|
|
|
req.flush(); // Flush the request headers.
|
|
|
|
req.flush(); // Should be idempotent.
|
|
|
|
});
|