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

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).

(cherry picked from commit 2166733628)
This commit is contained in:
Jean-Sébastien Pédron 2016-12-29 15:48:06 +01:00 committed by Loïc Hoguin
parent a62cc4260f
commit 98c2bc64e5
No known key found for this signature in database
GPG key ID: 71366FF21851DF03
3 changed files with 144 additions and 19 deletions

Binary file not shown.