xref: /third_party/node/test/parallel/test-http-server-delete-parser.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ciconst common = require('../common');
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ciconst http = require('http');
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ciconst server = http.createServer(common.mustCall((req, res) => {
81cb0ef41Sopenharmony_ci  res.writeHead(200, { 'Content-Type': 'text/plain' });
91cb0ef41Sopenharmony_ci  res.write('okay', common.mustCall(() => {
101cb0ef41Sopenharmony_ci    delete res.socket.parser;
111cb0ef41Sopenharmony_ci  }));
121cb0ef41Sopenharmony_ci  res.end();
131cb0ef41Sopenharmony_ci}));
141cb0ef41Sopenharmony_ci
151cb0ef41Sopenharmony_ciserver.listen(0, '127.0.0.1', common.mustCall(() => {
161cb0ef41Sopenharmony_ci  const req = http.request({
171cb0ef41Sopenharmony_ci    port: server.address().port,
181cb0ef41Sopenharmony_ci    host: '127.0.0.1',
191cb0ef41Sopenharmony_ci    method: 'GET',
201cb0ef41Sopenharmony_ci  });
211cb0ef41Sopenharmony_ci  req.end();
221cb0ef41Sopenharmony_ci}));
231cb0ef41Sopenharmony_ci
241cb0ef41Sopenharmony_ciserver.unref();
25

Indexes created Thu Nov 07 10:32:03 CST 2024