We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v20.9.0
Linux pc 5.15.0-88-generic #98~20.04.1-Ubuntu SMP Mon Oct 9 16:43:45 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
http
const net = require("node:net"); const http = require("node:http"); const sleep = (seconds) => new Promise(resolve => setTimeout(resolve, seconds * 1000)); http.createServer(async (req, res) => { if (req.url === "/first") { await sleep(3); } if (req.url === "/second") { await sleep(0); } console.log(req.url); res.end(req.url); }).listen(3000, () => { const socket = net.createConnection(3000, "localhost", () => { socket.write( "POST /first HTTP/1.1\r\n" + "Host: localhost:3000\r\n" + "\r\n" + "POST /second HTTP/1.1\r\n" + "Host: localhost:3000\r\n" + "\r\n" ); }); });
always
since the requests are using unsafe methods, the first request should be processed entirely before processing the second request
the second request prints to the console before the first request
from the HTTP/1.1 spec: "A server MAY process a sequence of pipelined requests in parallel if they all have safe methods" (from https://httpwg.org/specs/rfc9112.html#pipelining)
about safe methods: https://httpwg.org/specs/rfc9110.html#safe.methods about "MAY": https://www.rfc-editor.org/rfc/rfc2119.html
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version
v20.9.0
Platform
Linux pc 5.15.0-88-generic #98~20.04.1-Ubuntu SMP Mon Oct 9 16:43:45 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
http
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
since the requests are using unsafe methods, the first request should be processed entirely before processing the second request
What do you see instead?
the second request prints to the console before the first request
Additional information
from the HTTP/1.1 spec: "A server MAY process a sequence of pipelined requests in parallel if they all have safe methods" (from https://httpwg.org/specs/rfc9112.html#pipelining)
about safe methods: https://httpwg.org/specs/rfc9110.html#safe.methods
about "MAY": https://www.rfc-editor.org/rfc/rfc2119.html
The text was updated successfully, but these errors were encountered: