http-parser icon indicating copy to clipboard operation
http-parser copied to clipboard

HTTP/0.9 does not have header fields

Open tatsuhiro-t opened this issue 8 years ago • 0 comments

According to https://www.w3.org/Protocols/HTTP/AsImplemented.html, HTTP/0.9 does not have header fields, and single CR + LF pair (or just LF) after a request line signals the end of request. But current http-parser waits for 2nd CR + LF pair.

See how apache works:

$ telnet 127.0.0.1 80
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
GET /
<html><body><h1>It works!</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>
</body></html>
Connection closed by foreign host.

tatsuhiro-t avatar Sep 06 '17 14:09 tatsuhiro-t