Skip to content

assertion error in _http_client.js #26404

@Trott

Description

@Trott
  • Version: v12.0.0-pre (master branch)
  • Platform: macOS Mojave, but probably irrelevant
  • Subsystem: http

This code causes an assertion error in _http_client.js. Not sure if monkey-patching should be prevented or if the assertion should be a throw instead. But obviously it shouldn't be possible to trigger it.

'use strict';

const http = require('http');

const server = http.createServer((req, res) => {
  res.writeHead(200, { 'Content-Type': 'text/plain' });
  res.end('okay');
});

server.listen(1337, '127.0.0.1');

const req = http.request({
  port: 1337,
  host: '127.0.0.1',
  method: 'GET',
});

req.write('');
req.end(() => { delete req.socket.parser; });

@nodejs/http

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpIssues or PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions