You've already forked cpp-httplib
Extend built-in extension MIME mapping (#799)
* Update README.md * Update httplib.h * Update httplib.h * Update httplib.h * Update httplib.h * Remove duplicate cases Someone left a bunch of duplicate cases, idiot, couldn't have been me. * Reformat Modify spacing and whatnot * Update README.md
This commit is contained in:
58
README.md
58
README.md
@ -120,22 +120,48 @@ svr.set_file_extension_and_mimetype_mapping("hh", "text/x-h");
|
||||
|
||||
The followings are built-in mappings:
|
||||
|
||||
| Extension | MIME Type |
|
||||
| :-------- | :--------------------- |
|
||||
| txt | text/plain |
|
||||
| html, htm | text/html |
|
||||
| css | text/css |
|
||||
| jpeg, jpg | image/jpg |
|
||||
| png | image/png |
|
||||
| gif | image/gif |
|
||||
| svg | image/svg+xml |
|
||||
| ico | image/x-icon |
|
||||
| json | application/json |
|
||||
| pdf | application/pdf |
|
||||
| js | application/javascript |
|
||||
| wasm | application/wasm |
|
||||
| xml | application/xml |
|
||||
| xhtml | application/xhtml+xml |
|
||||
| Extension | MIME Type |
|
||||
| :--------- | :-------------------------- |
|
||||
| css | text/css |
|
||||
| csv | text/csv |
|
||||
| txt | text/plain |
|
||||
| vtt | text/vtt |
|
||||
| html, htm | text/html |
|
||||
| apng | image/apng |
|
||||
| avif | image/avif |
|
||||
| bmp | image/bmp |
|
||||
| gif | image/gif |
|
||||
| png | image/png |
|
||||
| svg | image/svg+xml |
|
||||
| webp | image/webp |
|
||||
| ico | image/x-icon |
|
||||
| tif | image/tiff |
|
||||
| tiff | image/tiff |
|
||||
| jpeg, jpg | image/jpeg |
|
||||
| mp4 | video/mp4 |
|
||||
| mpeg | video/mpeg |
|
||||
| webm | video/webm |
|
||||
| mp3 | audio/mp3 |
|
||||
| mpga | audio/mpeg |
|
||||
| weba | audio/webm |
|
||||
| wav | audio/wave |
|
||||
| otf | font/otf |
|
||||
| ttf | font/ttf |
|
||||
| woff | font/woff |
|
||||
| woff2 | font/woff2 |
|
||||
| 7z | application/x-7z-compressed |
|
||||
| atom | application/atom+xml |
|
||||
| pdf | application/pdf |
|
||||
| mjs, js | application/javascript |
|
||||
| json | application/json |
|
||||
| rss | application/rss+xml |
|
||||
| tar | application/x-tar |
|
||||
| xhtml, xht | application/xhtml+xml |
|
||||
| xslt | application/xslt+xml |
|
||||
| xml | application/xml |
|
||||
| gz | application/gzip |
|
||||
| zip | application/zip |
|
||||
| wasm | application/wasm |
|
||||
|
||||
NOTE: These the static file server methods are not thread safe.
|
||||
|
||||
|
Reference in New Issue
Block a user