0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 04:10:24 +00:00
Small, fast, modern HTTP server for Erlang/OTP.
Find a file
Loïc Hoguin 592029070d
Reduce number of Transport:send/2 calls for HTTP/2
When sending a complete response it is far more efficient
to send the headers and the body in one Transport:send/2
call instead of two or more, at least for small responses.

This is the HTTP/2 counterpart to what was done for HTTP/1.1
many years ago in bfab8d4b22.

In HTTP/2's case however the implementation is a little
more difficult due to flow control. On the other hand the
optimization will apply not only for headers/body but also
for the body of multiple separate responses, which may need
to be sent all at the same time when we receive a WINDOW_UPDATE
frame.

When a body is sent using sendfile however a separate call
is still made.
2020-01-02 13:29:56 +01:00
doc/src No longer use erlang:get_stacktrace/0 2019-12-31 15:10:38 +01:00
ebin Cowboy 2.7.0 2019-10-10 16:15:51 +02:00
examples Document the commands based Websocket interface 2019-10-06 16:51:27 +02:00
src Reduce number of Transport:send/2 calls for HTTP/2 2020-01-02 13:29:56 +01:00
test Ignore malformed accept-encoding headers in cowboy_compress_h 2019-12-31 13:48:05 +01:00
.gitattributes Convert the documentation to Asciidoc 2016-01-14 13:37:20 +01:00
.gitignore gitignore: add examples/ dependency files 2016-05-25 12:54:12 +02:00
CONTRIBUTING.asciidoc Document how to run all test suites 2018-11-20 13:28:48 +01:00
erlang.mk Update erlang.mk 2018-09-12 15:00:48 +02:00
LICENSE Welcome to 2017 2017-01-02 19:36:36 +01:00
Makefile Add a commented option in the Makefile 2019-12-31 11:12:04 +01:00
plugins.mk Document the commands based Websocket interface 2019-10-06 16:51:27 +02:00
README.asciidoc Add sponsor link to the README 2019-12-31 11:12:44 +01:00
rebar.config Cowboy 2.7.0 2019-10-10 16:15:51 +02:00

= Cowboy

Cowboy is a small, fast and modern HTTP server for Erlang/OTP.

== Goals

Cowboy aims to provide a *complete* HTTP stack in a *small* code base.
It is optimized for *low latency* and *low memory usage*, in part
because it uses *binary strings*.

Cowboy provides *routing* capabilities, selectively dispatching requests
to handlers written in Erlang.

Because it uses Ranch for managing connections, Cowboy can easily be
*embedded* in any other application.

Cowboy is *clean* and *well tested* Erlang code.

== Online documentation

* https://ninenines.eu/docs/en/cowboy/2.6/guide[User guide]
* https://ninenines.eu/docs/en/cowboy/2.6/manual[Function reference]

== Offline documentation

* While still online, run `make docs`
* User guide available in `doc/` in PDF and HTML formats
* Function reference man pages available in `doc/man3/` and `doc/man7/`
* Run `make install-docs` to install man pages on your system
* Full documentation in Asciidoc available in `doc/src/`
* Examples available in `examples/`

== Getting help

* Official IRC Channel: #ninenines on irc.freenode.net
* https://github.com/ninenines/cowboy/issues[Issues tracker]
* https://ninenines.eu/services[Commercial Support]
* https://github.com/sponsors/essen[Sponsor me!]