1'use strict'; 2 3const common = require('../common'); 4 5const http = require('http'); 6 7const server = http.createServer(common.mustCall((req, res) => { 8 res.writeHead(200, { 'Content-Type': 'text/plain' }); 9 res.write('okay', common.mustCall(() => { 10 delete res.socket.parser; 11 })); 12 res.end(); 13})); 14 15server.listen(0, '127.0.0.1', common.mustCall(() => { 16 const req = http.request({ 17 port: server.address().port, 18 host: '127.0.0.1', 19 method: 'GET', 20 }); 21 req.end(); 22})); 23 24server.unref(); 25