2012-08-30 21:14:37 +08:00
|
|
|
// Called by test/pummel/test-regress-GH-892.js
|
|
|
|
|
2011-04-14 03:49:11 +08:00
|
|
|
var https = require('https');
|
|
|
|
var fs = require('fs');
|
|
|
|
var assert = require('assert');
|
|
|
|
|
|
|
|
var PORT = parseInt(process.argv[2]);
|
|
|
|
var bytesExpected = parseInt(process.argv[3]);
|
|
|
|
|
|
|
|
var gotResponse = false;
|
|
|
|
|
|
|
|
var options = {
|
|
|
|
method: 'POST',
|
2012-08-30 22:43:20 +08:00
|
|
|
port: PORT,
|
|
|
|
rejectUnauthorized: false
|
2011-04-14 03:49:11 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
var req = https.request(options, function(res) {
|
|
|
|
assert.equal(200, res.statusCode);
|
|
|
|
gotResponse = true;
|
2011-10-05 06:08:18 +08:00
|
|
|
console.error('DONE');
|
2012-12-20 00:56:24 +08:00
|
|
|
res.resume();
|
2011-04-14 03:49:11 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
req.end(new Buffer(bytesExpected));
|
|
|
|
|
|
|
|
process.on('exit', function() {
|
|
|
|
assert.ok(gotResponse);
|
|
|
|
});
|