11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ciconst common = require('../common'); 41cb0ef41Sopenharmony_ciconst assert = require('assert'); 51cb0ef41Sopenharmony_ciconst http = require('http'); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ciconst server = http.createServer(common.mustCall(function(req, res) { 81cb0ef41Sopenharmony_ci req.once('data', common.mustCall(() => { 91cb0ef41Sopenharmony_ci req.pause(); 101cb0ef41Sopenharmony_ci res.writeHead(200); 111cb0ef41Sopenharmony_ci res.end(); 121cb0ef41Sopenharmony_ci res.on('finish', common.mustCall(() => { 131cb0ef41Sopenharmony_ci assert(!req._dumped); 141cb0ef41Sopenharmony_ci })); 151cb0ef41Sopenharmony_ci })); 161cb0ef41Sopenharmony_ci})); 171cb0ef41Sopenharmony_ciserver.listen(0); 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_ciserver.on('listening', common.mustCall(function() { 201cb0ef41Sopenharmony_ci const req = http.request({ 211cb0ef41Sopenharmony_ci port: this.address().port, 221cb0ef41Sopenharmony_ci method: 'POST', 231cb0ef41Sopenharmony_ci path: '/' 241cb0ef41Sopenharmony_ci }, common.mustCall(function(res) { 251cb0ef41Sopenharmony_ci assert.strictEqual(res.statusCode, 200); 261cb0ef41Sopenharmony_ci res.resume(); 271cb0ef41Sopenharmony_ci res.on('end', common.mustCall(() => { 281cb0ef41Sopenharmony_ci server.close(); 291cb0ef41Sopenharmony_ci })); 301cb0ef41Sopenharmony_ci })); 311cb0ef41Sopenharmony_ci 321cb0ef41Sopenharmony_ci req.end(Buffer.allocUnsafe(1024)); 331cb0ef41Sopenharmony_ci})); 34