deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

Allow HEAD mathod in file-server

Open carragom opened this issue 8 months ago • 0 comments

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.

carragom avatar Jul 03 '25 00:07 carragom