0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00
Commit graph

1454 commits

Author SHA1 Message Date
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
3c198f7d90
Fix and update the compress example to use cowboy_compress_h 2017-01-22 20:17:52 +01:00
Loïc Hoguin
413196ace1
Erlang/OTP 19.2.1 2017-01-22 15:52:46 +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
3b91523a3c
Fix error responses not including a content-length
This would prevent the client from knowing whether the request
was received fully without the connection closing first.
2017-01-20 16:06:27 +01:00
Loïc Hoguin
353dc29d8f
Fix protocol breaking when user tries to send empty chunk
The {data, IsFin, Data} uses IsFin to indicate whether this
is the last chunk, while chunked transfer-encoding uses the
length of Data, and ends when it is 0. We must therefore not
send chunks with empty data.
2017-01-20 15:16:50 +01:00
Loïc Hoguin
0f8452cafa
Add support for multiple stream handlers
The stream handlers can be specified using the protocol
option 'stream_handlers'. It defaults to [cowboy_stream_h].

The cowboy_stream_h module currently does not forward the
calls to further stream handlers. It feels like an edge
case; usually we'd want to put our own handlers between
the protocol code and the request process. I am therefore
going to focus on other things for now.

The various types and specifications for stream handlers
have been updated and the cowboy_stream module can now
be safely used as a behavior. The interface might change
a little more, though.

This commit does not include tests or documentation.
They will follow separately.
2017-01-16 14:36:33 +01:00
Loïc Hoguin
e5a8088e68
Make the new cowboy_req tests more realistic 2017-01-04 19:45:35 +01:00
Loïc Hoguin
f34ef2ceae
Improve the manual for the new resp_header functions 2017-01-04 19:21:23 +01:00
Johan Lövdahl
3f4e79d42f
Add functions for getting and setting response headers 2017-01-04 13:37:50 +01:00
Loïc Hoguin
42c95b1584
Rewrite the tests for header name/value limits
Putting them in the correct test suite, with the proper
documentation etc.
2017-01-03 18:07:39 +01:00
José Valim
f59c29dff0
Return status 431 if the request header field is too large
This commit changes Cowboy to follow RFC6585.
2017-01-03 17:47:23 +01:00
Loïc Hoguin
1048bff929
Update rebar.config 2017-01-03 12:15:42 +01:00
Loïc Hoguin
c5a9771ac4
Remove ROADMAP file
The only ROADMAP now is small fixes toward making it stable
and very little interface changes, so the file is not that
useful anymore.
2017-01-02 19:42:47 +01:00
Loïc Hoguin
43adacc760
Welcome to 2017 2017-01-02 19:36:36 +01:00
Loïc Hoguin
fac882164c
Update Erlang.mk 2017-01-02 19:28:48 +01:00
Loïc Hoguin
0e2bd04cc9
Update README 2017-01-02 19:28:11 +01:00
Loïc Hoguin
2dff25a61d
Remove AUTHORS file
Information can be found in cgit.
2017-01-02 19:27:50 +01:00
Loïc Hoguin
309780a9fd
Remaining Dialyzer fixes 2017-01-02 18:27:03 +01:00
Loïc Hoguin
637706ff1f
Update Ranch to 1.3.0 2017-01-02 16:47:54 +01:00
Loïc Hoguin
e10daf39fa
Numerous Dialyzer fixes 2017-01-02 16:47:16 +01:00
Loïc Hoguin
ed664345d7
Add a few more test cases for cowboy_req:match_qs 2017-01-02 14:56:20 +01:00
Loïc Hoguin
271e31c629
Various fixes and tweaks to the user guide 2017-01-02 14:46:19 +01:00
Loïc Hoguin
5838a0c81a
Add templates as Erlang.mk plugin 2016-12-28 17:54:50 +01:00
Loïc Hoguin
f7094ad78f
Update the cowboy_rest manual 2016-12-28 15:17:43 +01:00
Loïc Hoguin
afc7d08813
Leave a few manual pages for post 2.0.0-pre.4
In particular the cowboy_sub_protocol is subject to change soon.
Also the cowboy_stream behavior is going to be left hidden in
this release and enabled when it becomes easier to chain them.
2016-12-23 18:56:05 +01:00
Loïc Hoguin
3bcb1cb42e
Update cowboy_middleware 2016-12-23 18:52:02 +01:00
Loïc Hoguin
5da7d1ef05
Update cowboy_loop manual 2016-12-23 17:20:54 +01:00
Loïc Hoguin
b13c07932d
Update the cowboy_handler manual
Also fixes a small mistake in cowboy_websocket.
2016-12-23 15:33:21 +01:00
Loïc Hoguin
98ae01b599
Update the cowboy_static manual 2016-12-23 12:19:27 +01:00
Sasan Hezarkhani
56e489f00a
Updates cowboy_http documents changelog
The changelog had a wrong reference to an option that was updated.
`max_header_request_line_length` -> `max_request_line_length`
2016-12-22 23:56:48 +01:00
Loïc Hoguin
cbc7056395
Update cowboy_websocket_manual 2016-12-22 18:13:25 +01:00
Loïc Hoguin
e584412de7
Add the manual for cowboy_http2 2016-12-22 15:19:38 +01:00
Loïc Hoguin
a9d9c9d902
Add cowboy_http manual
Updates and replaces the cowboy_protocol manual.
2016-12-22 14:48:02 +01:00
Loïc Hoguin
a1b52494a5
Update the cowboy_router manual 2016-12-22 12:53:21 +01:00
Loïc Hoguin
89120a3606
Update CI release list 2016-12-21 17:20:27 +01:00
Loïc Hoguin
ba14cf7838
Add man pages for the reply functions 2016-12-21 15:47:44 +01:00
Loïc Hoguin
f57dd51e0f
Update Erlang.mk 2016-12-02 19:23:19 +01:00
Loïc Hoguin
c528d9b0f7
Add the man pages for body reading functions
[ci skip]
2016-12-02 16:50:55 +01:00
Loïc Hoguin
7b248e5163
Add man pages for the parse/match/binding cowboy_req functions 2016-11-07 18:03:47 +02:00
Loïc Hoguin
bd34dfdedd
Small tweak to Asciidoc
Fixes Hugo rendering.
2016-11-07 01:44:15 +02:00
Loïc Hoguin
b2e981ca40
Add man pages for parse_qs, match_qs and parse_header
[ci skip]
2016-11-07 01:12:30 +02:00
Loïc Hoguin
0df88c0d0a
Tweak small things in the cowboy manual 2016-11-05 14:22:18 +02:00
Loïc Hoguin
a24d48fec6
Add HiPE and ErLLVM testing 2016-11-05 14:20:19 +02:00
Loïc Hoguin
faca7866ed
Partially update manual for the cowboy_req
Only the access functions have been modified so far.
2016-11-05 14:17:30 +02:00
Loïc Hoguin
8fe700f341
Erlang/OTP 19.1.5 2016-10-18 11:19:56 +02:00
Christopher Adams
59c32506c0
Fix if_modified_since match of last_modified
Correct expected return type from `no_call` to `undefined` in
if_modified_since when last_modified callback is not defined. Add an
http_SUITE test to catch regressions.
2016-10-18 10:43:47 +02:00
Loïc Hoguin
932f1301c5
Erlang/OTP 19.1.4 2016-10-14 16:46:06 +02:00
Loïc Hoguin
a197b35f89
Update CI targets 2016-10-10 23:31:04 +02:00
Loïc Hoguin
144c5c0cc7
Small tweaks to cowboy module manual 2016-10-01 13:33:48 +02:00