- cacheMatch
bool cacheMatch(string match, ETag etag, Flag!"allowWeak" allow_weak)
Matches a given match expression with a specific ETag. Can allow or disallow weak ETags and supports multiple tags.
- handleCache
bool handleCache(HTTPServerRequest req, HTTPServerResponse res, ETag etag, SysTime last_modified, string cache_control, Duration max_age)
Processes header tags in a request and writes responses given on requested cache status.
- handleCacheFile
bool handleCacheFile(HTTPServerRequest req, HTTPServerResponse res, string file, string cache_control, Duration max_age)
bool handleCacheFile(HTTPServerRequest req, HTTPServerResponse res, NativePath file, string cache_control, Duration max_age)
bool handleCacheFile(HTTPServerRequest req, HTTPServerResponse res, FileInfo dirent, string cache_control, Duration max_age)
Calls handleCache with prefilled etag and lastModified value based on a file.
- sendFile
void sendFile(HTTPServerRequest req, HTTPServerResponse res, NativePath path, HTTPFileServerSettings settings)
Sends a file to the given HTTP server response object.
- serveStaticFile
HTTPServerRequestDelegateS serveStaticFile(NativePath local_path, HTTPFileServerSettings settings)
HTTPServerRequestDelegateS serveStaticFile(string local_path, HTTPFileServerSettings settings)
Returns a request handler that serves a specific file on disk.
- serveStaticFiles
HTTPServerRequestDelegateS serveStaticFiles(NativePath local_path, HTTPFileServerSettings settings)
HTTPServerRequestDelegateS serveStaticFiles(string local_path, HTTPFileServerSettings settings)
Returns a request handler that serves files from the specified directory.
A static HTTP file server.