You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
589 B

// Called by test/pummel/test-regress-GH-892.js
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',
port: PORT,
rejectUnauthorized: false
};
var req = https.request(options, function(res) {
assert.equal(200, res.statusCode);
gotResponse = true;
console.error('DONE');
res.resume();
});
req.end(Buffer.allocUnsafe(bytesExpected));
process.on('exit', function() {
assert.ok(gotResponse);
});