Sends a file to the given HTTP server response object.
When serving a file, certain request headers are supported to avoid sending
the file if the client has it already cached. These headers are
"If-Modified-Since" and "If-None-Match". The client will be delivered
with the necessary "Etag" (generated from the path, size and last
modification time of the file) and "Last-Modified" headers.
The cache control directives "Expires" and "Cache-Control" will also be
emitted if the HTTPFileServerSettings.maxAge field is set to a positive
duration.
Finally, HEAD requests will automatically be handled without reading the
actual file contents. Am empty response body is written instead.
Sends a file to the given HTTP server response object.
When serving a file, certain request headers are supported to avoid sending the file if the client has it already cached. These headers are "If-Modified-Since" and "If-None-Match". The client will be delivered with the necessary "Etag" (generated from the path, size and last modification time of the file) and "Last-Modified" headers.
The cache control directives "Expires" and "Cache-Control" will also be emitted if the HTTPFileServerSettings.maxAge field is set to a positive duration.
Finally, HEAD requests will automatically be handled without reading the actual file contents. Am empty response body is written instead.