Loïc Hoguin
a72bf4105f
Fix static_handler suite code path
...
A future OTP release will use 'strict' code path by default.
This change ensures it works both for old and new OTP.
2023-12-15 10:35:37 +01:00
Loïc Hoguin
4edc39b003
Don't stop listeners that don't exist in static_handler_SUITE
2020-05-20 11:08:24 +02:00
Loïc Hoguin
4427108b69
Improve the cowboy_static consistency across platforms
...
As a result we explictly reject path_info components that include
a forward slash, backward slash or NUL character. This only applies
to the [...] part of the path for dir/priv_dir configuration.
Also improve the tests so that they work on Windows.
2019-09-07 12:18:16 +02:00
Loïc Hoguin
36441d35bd
Correct tests modifying mtime of static files
...
On macOS this resulted in failure because the mtime did not
change between test groups. The mtime should now always change.
2019-09-06 12:56:16 +02:00
Loïc Hoguin
705fa9755f
Add a cowboy_static test with an uppercase filename/extension
2019-04-01 15:04:33 +02:00
Loïc Hoguin
031b421732
Fix case insensitive filesystems in static_handler test suite
2018-11-19 19:45:47 +01:00
Loïc Hoguin
ae96aa6e49
Add an additional test to the static test suite
2018-11-19 12:24:28 +01:00
Loïc Hoguin
84aea5d24d
Silence expected errors from the static_handler test suite
2018-11-19 12:15:40 +01:00
Loïc Hoguin
637a9b3924
Don't send an unnecessary content-type header with cowboy_rest
2018-11-14 18:04:31 +01:00
Loïc Hoguin
fe1ee080de
Enable range requests support in cowboy_static
2018-11-11 16:25:45 +01:00
Loïc Hoguin
be09711687
Add an option to disable sendfile for a listener
2018-11-03 18:55:40 +01:00
Loïc Hoguin
571719a164
Add a charset option to cowboy_static
2018-11-02 15:36:41 +01:00
Loïc Hoguin
a8335c63df
Always dialyze tests and fix some cowboy_req specs
2018-10-31 10:50:57 +01:00
Loïc Hoguin
619273e10e
Speed up testing large static files, 32MB instead of 512MB
2018-05-17 11:35:08 +02:00
Loïc Hoguin
1066a8d376
Remove two warnings in test suites
2017-11-29 17:03:16 +01:00
Loïc Hoguin
cf3ab5832a
Add nowarn_export_all to all test suites
2017-11-29 16:57:10 +01:00
Loïc Hoguin
8be803cb07
The static suite's large file is not created on Windows
2017-11-19 16:13:48 +01:00
Loïc Hoguin
ad9ab51648
Add some todos
2017-10-31 17:15:11 +00:00
Loïc Hoguin
fb13e5c9e9
Fix the static_handler test suite
...
Bad requests correctly return 400, not 500.
2017-10-31 15:41:25 +00:00
Loïc Hoguin
0995fc99e0
Add a static handler test with an empty file
2017-09-04 18:00:56 +02:00
Loïc Hoguin
0828e0b9ce
Alphabetical order some tests
2017-09-04 15:48:46 +02:00
Loïc Hoguin
4cbdfdd293
Fix sending of large files with HTTP/2
...
Also finish implementing the relevant test, getting rid of todos.
2017-02-05 13:45:35 +01:00
Jean-Sébastien Pédron
2166733628
cowboy_static: Add support for files in EZ archives
...
If cowboy_static is initialized with `{priv_file, ...}` or `{priv_dir,
...}`, it is now able to read files from Erlang application .ez
archives.
When serving a file from an archive, the #file_info{} comes from the
archive, not the contained file, except for the size and type. The
erl_prim_loader module is used to read the latter's #file_info{} and the
actual file content (ie. sendfile(2) is not used in this case).
2017-01-24 11:36:58 +01:00
Loïc Hoguin
3e05ab8f82
Add experimental cowboy_compress_h stream handler
...
Currently marked as experimental because it can't be tweaked
(just enabled/disabled) and because it is not documented yet.
2017-01-22 10:50:39 +01:00
Loïc Hoguin
43adacc760
Welcome to 2017
2017-01-02 19:36:36 +01:00
Loïc Hoguin
e291c3bb94
Add the static_handler test suite
2016-06-06 17:41:26 +02:00