You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file server seems to have some points where the implementation could be refactored.
HEAD request support Golang's std server and hyper-staticfile seem to support this.
I think it's easy to implement just by conditionally branching with req.method === "HEAD".
The file server seems to have some points where the implementation could be refactored.
HEAD request supportGolang's std server and hyper-staticfile seem to support this.
I think it's easy to implement just by conditionally branching with
req.method === "HEAD"
.In recent versions of Deno, the Date header is automatically set if it's not present. So I think adding the Date header inside
setBaseHeader()
is unnecessary.(chore(http/file_server): remove unnecessary Date header generation #3364)
https://github.com/denoland/deno_std/blob/699ba98572f28e6dfb423abe959502ba6a96c551/http/file_server.ts#L328-L334
Inside
serveDirIndex
there are serial await calls. It seems that it can be speeded up by calling this in parallel.(perf(http/file_server): read fileinfo in parallel #3363)
Currently it returns content with 200 OK for paths like
/path//////to////file.txt
. I think such requests should be redirected to a normalized path. (fix(http/file_server): Redirect non-canonical URL to canonical URL #3362)It would be nice to use JSDoc's
@module
tag to enhance the documentation. (chore(http/file_server): add module documentation #3368)I will submit a PR on these points later.
The text was updated successfully, but these errors were encountered: