0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Add a static handler test with an empty file

This commit is contained in:
Loïc Hoguin 2017-09-04 18:00:56 +02:00
parent 0828e0b9ce
commit 0995fc99e0
No known key found for this signature in database
GPG key ID: 71366FF21851DF03

View file

@ -337,6 +337,11 @@ dir_dotdot_file(Config) ->
{404, _, _} = do_get(config(prefix, Config) ++ "/directory/../../static/style.css", Config), {404, _, _} = do_get(config(prefix, Config) ++ "/directory/../../static/style.css", Config),
ok. ok.
dir_empty_file(Config) ->
doc("Get an empty .txt file."),
{200, Headers, <<>>} = do_get(config(prefix, Config) ++ "/empty.txt", Config),
ok.
dir_error_directory(Config) -> dir_error_directory(Config) ->
doc("Try to get a directory."), doc("Try to get a directory."),
{403, _, _} = do_get(config(prefix, Config) ++ "/directory", Config), {403, _, _} = do_get(config(prefix, Config) ++ "/directory", Config),