Skip to content

HTTP connection prematurely closed when unescaped space present in query string #13407

Closed
@alexkwolfe

Description

@alexkwolfe
  • Version: v6.10.3, v8.0.0
  • Platform: Darwin emerald.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
  • Subsystem: http

When handling an HTTP request with an unescaped space in the query string, the connection is prematurely closed.

Example

const http = require('http');

http.createServer((req, res) => {
  res.writeHead(200);
  res.write('ok');
  res.end();
}).listen(8080);
$ curl -v 'http://localhost:8080?foo=bar &baz=bip'
> GET /?foo=bar &baz=bip HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.51.0
> Accept: */*
> 
curl: (52) Empty reply from server

Metadata

Metadata

Assignees

No one assigned

    Labels

    http_parserIssues and PRs related to the HTTP Parser dependency or the http_parser binding.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions