%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
'use strict'; // Test https highWaterMark const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); const assert = require('assert'); const https = require('https'); const fixtures = require('../common/fixtures'); let counter = 0; function loadCallback(highWaterMark) { return common.mustCall(function(res) { assert.strictEqual(highWaterMark, res.readableHighWaterMark); counter--; console.log('back from https request. ', `highWaterMark = ${res.readableHighWaterMark}`); if (counter === 0) { httpsServer.close(); console.log('ok'); } res.resume(); }); } // create server const httpsServer = https.createServer({ key: fixtures.readKey('agent1-key.pem'), cert: fixtures.readKey('agent1-cert.pem') }, common.mustCall(function(req, res) { res.writeHead(200, {}); res.end('ok'); }, 3)).listen(0, common.mustCall(function(err) { console.log(`test https server listening on port ${this.address().port}`); assert.ifError(err); https.request({ method: 'GET', path: `/${counter++}`, host: 'localhost', port: this.address().port, rejectUnauthorized: false, highWaterMark: 128000, }, loadCallback(128000)).on('error', common.mustNotCall()).end(); https.request({ method: 'GET', path: `/${counter++}`, host: 'localhost', port: this.address().port, rejectUnauthorized: false, highWaterMark: 0, }, loadCallback(0)).on('error', common.mustNotCall()).end(); https.request({ method: 'GET', path: `/${counter++}`, host: 'localhost', port: this.address().port, rejectUnauthorized: false, highWaterMark: undefined, }, loadCallback(16 * 1024)).on('error', common.mustNotCall()).end(); }));