vibe.d beta banner
get vibe.d
0.8.6

Asynchronous I/O that doesn’t get in your way, written in D

Module vibe.http.fileserver

A static HTTP file server.

Functions

NameDescription
cacheMatch(match, etag, allow_weak) Matches a given match expression with a specific ETag. Can allow or disallow weak ETags and supports multiple tags.
handleCache(req, res, etag, last_modified, cache_control, max_age) Processes header tags in a request and writes responses given on requested cache status.
handleCacheFile(req, res, file, cache_control, max_age) Calls handleCache with prefilled etag and lastModified value based on a file.
sendFile(req, res, path, settings) Sends a file to the given HTTP server response object.
serveStaticFile(local_path, settings) Returns a request handler that serves a specific file on disk.
serveStaticFiles(local_path, settings) Returns a request handler that serves files from the specified directory.

Classes

NameDescription
HTTPFileServerSettings Configuration options for the static file server.

Structs

NameDescription
ETag Represents an Entity-Tag value for use inside HTTP Cache headers.

Enums

NameDescription
HTTPFileServerOption Additional options for the static file server.
Authors

Sönke Ludwig

Copyright

© 2012-2015 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.