Struct http_file_headers::Config[][src]

pub struct Config { /* fields omitted */ }

A configuration with the builder interface

Methods

impl Config
[src]

New configuration with default values

Defaults:

  • text_charset("utf-8")
  • no index files
  • encodings_on_text_files()
  • etags, last-modified and conditions based on them are enabled
  • content-type is enabled

Set default charset for all text mime types

Note: by default it's utf-8, you may disable it using no_text_charset()

Disable adding charset value to all text mime types

Add a name of the file used as the directory index, like index.html

Multiple names can be added. They are probed in the order in which they are defined here. Also, these filenames with encoding extensions are tried too.

Do not search for .br and .gz files

Search for .br and .gz files for text files

Text files re those having text/* mime type or application/javascript

Search for .br and .gz files for all files regardless of mime type

Togggles generation of Content-Type header (so user can override)

By default it's enabled

Toggles generation of Etag generation (and so If-None-Match too)

By default it's enabled

Toggles generation of Last-Modified (and so If-Modified-Since too)

Note: Last-Modified date is never sent if date is earlier than 1990-01-01.

Finalize configuration and wrap into an Arc

Trait Implementations

impl Clone for Config
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Config
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Config

impl Sync for Config