blob: 2c307f3d1732cd9e65561970cbb2a037f6f1c4c7 (
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
|
'use strict';
// Failing test for https
// Will fail with "socket hang up" for 4 out of 10 requests
// Tested on node 0.5.0-pre commit 9851574
const common = require('../common');
const https = require('https');
for (var i = 0; i < 10; ++i) {
https.get({
host: 'www.google.com',
path: '/accounts/o8/id',
port: 443
}, function(res) {
var data = '';
res.on('data', function(chunk) {
data += chunk;
});
res.on('end', function() {
console.log(res.statusCode);
});
}).on('error', function(error) {
console.log(error);
});
}
|