Open kensnyder opened 1 week ago
@cirospaciari I'd like to work on this, since I also did the OPTIONS thing. The same part of code is responsible here. But HEAD is different, since RFC says it must not send a body, but headers should be same as if its a GET Request... so i think its reasonable to make an exception in Code for HEAD Request, not changing headers, but ommiting the body.
If you want me working on this, just set me as assignee
What version of Bun is running?
1.1.36
What platform is your computer?
Darwin 24.1.0 arm64 arm
What steps can reproduce the bug?
Consider the following code:
What is the expected behavior?
To conform to HTTP Server specs, I'd like to be able to respond to HEAD requests with a Content-Length of the size of the actual resource.
What do you see instead?
Bun appears to change the Content-Length to 0 before responding.
Additional information
Also reported in Discord on May 15, 2024 by fry69: https://discord.com/channels/876711213126520882/1240212448552816710/1240212448552816710