blob: 498a537a12784c9c69eadbfd7b32e17ef1e15d66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// 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(new Buffer(bytesExpected));
process.on('exit', function() {
assert.ok(gotResponse);
});
|