mirror of https://github.com/lukechilds/node.git
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.
29 lines
595 B
29 lines
595 B
// Called by test/pummel/test-regress-GH-892.js
|
|
|
|
const https = require('https');
|
|
const fs = require('fs');
|
|
const 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);
|
|
});
|
|
|