0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 12:40:25 +00:00

Add UTF-8 support to example file_server

LH: I have fixed issues in the PR and incorporated changes
from a sister PR by @djankovic (git author: Dom J). I also
made sure the UTF-8 files were readable without Chinese
fonts and added their downloading to the examples test suite.
This commit is contained in:
lin 2023-02-15 00:30:18 +08:00 committed by Loïc Hoguin
parent 32594a5199
commit 4f26d6a573
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
4 changed files with 20 additions and 4 deletions

View file

@ -15,7 +15,8 @@ start(_Type, _Args) ->
{'_', [
{"/[...]", cowboy_static, {priv_dir, file_server, "", [
{mimetypes, cow_mimetypes, all},
{dir_handler, directory_h}
{dir_handler, directory_h},
{charset, <<"utf-8">>}
]}}
]}
]),