Open prstance opened 1 year ago
I'm referring to @Vexcited, who is blocked due to this issue; indeed, his "Origin" header gets converted to lowercase because of this bug. #4529
I think it's this pull request (#2288) that broke it. (convertToASCIILowercase)
What version of Bun is running?
1.0.3+b651b16fdd959b349c09ec5d5056229dcd12c86b
What platform is your computer?
Linux 5.15.90.1-microsoft-standard-WSL2 x86_64 x86_64
What steps can reproduce the bug?
To reproduce the bug, you need to follow these steps:
http.createServer(function (req, res) { res.write(JSON.stringify(req.rawHeaders)); res.end(); }).listen(3000, function() { console.log("server start at port 3000"); });
What is the expected behavior?
The expected behavior is that the headers you set in the client code should be sent to the server as-is, with the same casing (capitalization) that you specified in the headers object.
What do you see instead?
The issue you're encountering is that when using the Bun runtime, some headers are sent in lowercase instead of the specified casing. This is causing a mismatch with the server's expectation, which may not be case-insensitive and expects headers in the exact casing provided.