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

308 commits

Author SHA1 Message Date
Loïc Hoguin
f0cae8dbcf
Document some undefined behavior in cowboy_router 2018-11-14 18:04:32 +01:00
Loïc Hoguin
c65e3ff20e
Add a use case to loop handlers 2018-11-14 18:04:31 +01:00
Loïc Hoguin
ef05956a5a
Document the proxy_header protocol option 2018-11-14 12:32:31 +01:00
Loïc Hoguin
8164b50453
Add deflate options for Websocket compression
They allow the server to configure what it is willing to accept
for both the negotiated configuration (takeover and window bits)
and the other zlib options (level, mem_level and strategy).

This can be used to reduce the memory and/or CPU footprint of
the compressed data, which comes with a cost in compression ratio.
2018-11-12 18:12:44 +01:00
Loïc Hoguin
d7b7580b39
Add sendfile support to cowboy_req:stream_body
It is now possible to stream one or more sendfile tuples.
A simple example of what can now be done would be for
example to build a tar file on the fly using the sendfile
syscall for sending the files, or to support Range requests
with more than one range with the sendfile syscall.

When using cowboy_compress_h unfortunately we have to read
the file in order to send it. More options will be added
at a later time to make sure users don't read too much
into memory. This is a new feature however so existing
code is not affected.

Also rework cowboy_http's data sending to be flatter.
2018-11-09 17:42:37 +01:00
Loïc Hoguin
805a156785
Test stop against all relevant REST callbacks 2018-11-05 10:30:26 +01:00
Loïc Hoguin
8c9ad7bf07
Add the rate_limited/2 REST callback 2018-11-04 11:58:59 +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
9569043bdd
Add RFC6657 to the list of related documents 2018-11-02 14:04:32 +01:00
Loïc Hoguin
e0b036fe68
Add tests for charsets_provided
Fix cases where the q-value is 0 and where a wildcard
was sent in the accept-charset header.

Also don't send a charset in the content-type of the
response if the media type is not text.

Thanks to Philip Witty for help figuring this out.
2018-11-02 13:54:19 +01:00
Loïc Hoguin
399b6a16b4
Better handle content negotiation when accept contains charsets
Thanks to Philip Witty for help figuring this out.
2018-11-02 13:49:54 +01:00
Loïc Hoguin
d4129e6305
Exit gracefully on parent exit/sys:terminate/2,3 2018-10-28 10:20:43 +01:00
Loïc Hoguin
497e9d459e
Add yet another RFC to the list 2018-10-26 10:15:41 +02:00
Loïc Hoguin
c998673eb0
Fix Cowboy version in the getting started chapter 2018-10-02 10:05:40 +02:00
getong
4493afbba0
Update Ranch to 1.6.2 2018-09-23 14:24:37 +02:00
Loïc Hoguin
8045f7a998
Add a spec to the list 2018-09-23 14:11:28 +02:00
Loïc Hoguin
9901a3b568
Update Cowlib to 2.6.0 2018-09-21 15:12:58 +02:00
Loïc Hoguin
f810d8dd64
Add the {active, boolean()} Websocket command
This command is currently not documented. It allows disabling
the reading of incoming data from the socket, and can be used
as a poor man's flow control.
2018-09-21 15:01:57 +02:00
Loïc Hoguin
6e784f1a45
Remove an outdated note about cowboy_loop timeout 2018-09-20 15:57:15 +02:00
Loïc Hoguin
9f401f8899
Add RFC 8441 to the list 2018-09-19 09:14:58 +02:00
Loïc Hoguin
b56a5a1d60
Do not send a 101 after a final response in switch_protocol 2018-09-12 16:16:29 +02:00
Loïc Hoguin
26bc4afad4
Prepare the 2.5.0 release 2018-09-12 15:00:48 +02:00
Loïc Hoguin
4b385749f2
Add cowboy_req:read_and_match_urlencoded_body/2,3 2018-09-07 13:56:12 +02:00
Loïc Hoguin
dcc6f9326f
Fix some grammatical errors in the manual 2018-09-07 13:53:12 +02:00
Loïc Hoguin
a02d6590c4
Add upcoming Clear Site Data draft to the list 2018-09-07 13:51:25 +02:00
Loïc Hoguin
3bda790901
Clarify the DEP_PLUGINS line in the Getting Started 2018-08-13 11:14:53 +02:00
Loïc Hoguin
2577068bf2
Remove an incorrect statement from the guide 2018-08-06 13:31:09 +02:00
Loïc Hoguin
a76c32db5e
Introduce undocumented option logger
This commit reworks the logging that Cowboy does via
error_logger to make the module that will do the actual
logging configurable.

The logger module interface must be the same as logger
and lager: a separate function per log level with the
same log levels they support.

The default behavior remains to call error_logger,
although some messages were downgraded to warnings
instead of errors. Since error_logger only supports
three different log levels, some messages may get
downgraded/upgraded depending on what the original
log level was to make them compatible with error_logger.

The {log, Level, Format, Args} command was also
added to stream handlers. Stream handlers should
use this command to log messages because it allows
writing a stream handler to intercept some of those
messages and extract information or block them as
necessary.

The logger option only applies to Cowboy itself,
not to the messages Ranch logs, so more work remains
to be done in that area.
2018-06-28 17:10:18 +02:00
Loïc Hoguin
1614335436
Remove a stream handlers related todo not worth doing 2018-06-27 18:08:29 +02:00
Loïc Hoguin
faefb634de
Document cowboy_req:stream_events/3 2018-06-27 10:29:49 +02:00
Loïc Hoguin
5001fcbc34
Add missing frame types to websocket_handle specs/docs
Thanks Artem.
2018-06-26 10:59:22 +02:00
Eric Meadows-Jönsson
f08f4610a0
Add streaming without chunking for HTTP/1.1
If content-length is set in the response headers
we can skip chunked transfer-encoding.
2018-06-25 11:44:38 +02:00
Loïc Hoguin
69451dd98d
The TLS certificate can be accessed directly 2018-06-11 20:51:57 +02:00
Loïc Hoguin
5758336453
Fix an example missing a " in the manual 2018-06-11 15:57:21 +02:00
Loïc Hoguin
76f19cf52d
Fix some formatting issues in the manual 2018-06-08 13:27:03 +02:00
Loïc Hoguin
a331145cde
Fix an incorrect section_title level in the manual 2018-06-06 18:03:01 +02:00
Loïc Hoguin
54c65ae49e
Fix the cowboy_stream manual page name 2018-06-06 14:42:39 +02:00
Loïc Hoguin
714b11639e
Add a comment about push requiring a secure connection 2018-06-04 14:32:50 +02:00
Loïc Hoguin
0e629f4799
Add option linger_timeout to cowboy_http 2018-05-16 16:01:30 +02:00
Loïc Hoguin
f0d9805601
Fix cowboy_http2 manual page formatting
[ci skip]
2018-05-02 11:08:40 +02:00
Loïc Hoguin
28d3515d71
Remove a bunch of todos 2018-04-30 18:39:27 +02:00
Loïc Hoguin
5d5f3f8461
Update Cowboy to 2.4.0 2018-04-30 15:12:09 +02:00
Loïc Hoguin
2db5ffbf84
Add SETTINGS ack timeout and option settings_timeout 2018-04-28 11:00:50 +02:00
Loïc Hoguin
9a29aea148
Add options controlling maximum h2 frame sizes 2018-04-27 17:58:37 +02:00
Loïc Hoguin
d38d86c4a9
Add options controlling initial control flow windows 2018-04-26 22:08:05 +02:00
Loïc Hoguin
7373822b86
Add the max_concurrent_streams h2 option 2018-04-25 21:32:58 +02:00
Loïc Hoguin
8f4adf437c
Add options to control h2's SETTINGS_HEADER_TABLE_SIZE 2018-04-25 16:55:52 +02:00
Loïc Hoguin
bbfc1569cc
Add initial implementation of Websocket over HTTP/2
Using the current draft:

  https://tools.ietf.org/html/draft-ietf-httpbis-h2-websockets-01
2018-04-04 17:23:37 +02:00
Loïc Hoguin
a7b06f2e13
Tentatively update Cowboy to 2.3.0 2018-03-28 18:15:40 +02:00