vibe.d beta banner
get vibe.d
0.10.1

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

Variable HTTPFileServerSettings.encodingFileExtension

Maps from encoding scheme (e.g. "gzip") to file extension.

class HTTPFileServerSettings
{
  // ...
  string[string] encodingFileExtension ;
  // ...
}

If a request accepts a supported encoding scheme, then the file server will look for a file with the extension as a suffix and, if that exists, sends it as the encoded representation instead of sending the original file.

Example

settings.encodingFileExtension["gzip"] = ".gz";
Authors

Sönke Ludwig

Copyright

© 2012-2015 Sönke Ludwig

License

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