deno_std
deno_std copied to clipboard
Allow HEAD mathod in file-server
Is your feature request related to a problem? Please describe.
When using the http file server from the CLI as documented with the following command:
deno run --allow-net --allow-read --allow-sys jsr:@std/http/file-server
The HEAD http method returns a 405 method not allowed.
Describe the solution you'd like
Implement the HEAD method in the file server.
Describe alternatives you've considered
This was discussed in Discord and looks like serveFile does support HEAD but serveDir does not. Apparently the discrepancy does not make much sense.