|
@@ -372,13 +372,16 @@ file_server(Config) ->
|
|
do_file_server(Transport, Protocol, Config) ->
|
|
do_file_server(Transport, Protocol, Config) ->
|
|
%% Directory.
|
|
%% Directory.
|
|
{200, DirHeaders, <<"<!DOCTYPE html><html>", _/bits >>} = do_get(Transport, Protocol, "/", Config),
|
|
{200, DirHeaders, <<"<!DOCTYPE html><html>", _/bits >>} = do_get(Transport, Protocol, "/", Config),
|
|
- {_, <<"text/html">>} = lists:keyfind(<<"content-type">>, 1, DirHeaders),
|
|
|
|
|
|
+ {_, <<"text/html; charset=utf-8">>} = lists:keyfind(<<"content-type">>, 1, DirHeaders),
|
|
_ = do_rest_get(Transport, Protocol, "/", <<"application/json">>, undefined, Config),
|
|
_ = do_rest_get(Transport, Protocol, "/", <<"application/json">>, undefined, Config),
|
|
%% Files.
|
|
%% Files.
|
|
{200, _, _} = do_get(Transport, Protocol, "/small.mp4", Config),
|
|
{200, _, _} = do_get(Transport, Protocol, "/small.mp4", Config),
|
|
{200, _, _} = do_get(Transport, Protocol, "/small.ogv", Config),
|
|
{200, _, _} = do_get(Transport, Protocol, "/small.ogv", Config),
|
|
{200, _, _} = do_get(Transport, Protocol, "/test.txt", Config),
|
|
{200, _, _} = do_get(Transport, Protocol, "/test.txt", Config),
|
|
{200, _, _} = do_get(Transport, Protocol, "/video.html", Config),
|
|
{200, _, _} = do_get(Transport, Protocol, "/video.html", Config),
|
|
|
|
+ {200, _, _} = do_get(Transport, Protocol,
|
|
|
|
+ ["/", cow_uri:urlencode(<<"中文"/utf8>>), "/", cow_uri:urlencode(<<"中文.html"/utf8>>)],
|
|
|
|
+ Config),
|
|
ok.
|
|
ok.
|
|
|
|
|
|
%% Markdown middleware.
|
|
%% Markdown middleware.
|