0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00
Small, fast, modern HTTP server for Erlang/OTP.
Find a file
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
doc/src Add sendfile support to cowboy_req:stream_body 2018-11-09 17:42:37 +01:00
ebin Prepare the 2.5.0 release 2018-09-12 15:00:48 +02:00
examples Accept a broader media type as input in rest_pastebin example 2018-11-01 14:44:55 +01:00
src Add sendfile support to cowboy_req:stream_body 2018-11-09 17:42:37 +01:00
test Add sendfile support to cowboy_req:stream_body 2018-11-09 17:42:37 +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 Update CONTRIBUTING 2015-11-16 18:55:53 +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 Always dialyze tests and fix some cowboy_req specs 2018-10-31 10:50:57 +01:00
plugins.mk Allow passing options to sub protocols 2017-02-18 18:26:20 +01:00
README.asciidoc Prepare the 2.5.0 release 2018-09-12 15:00:48 +02:00
rebar.config Initial support for the PROXY protocol header 2018-10-30 23:30:54 +01: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.5/guide[User guide]
* https://ninenines.eu/docs/en/cowboy/2.5/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]