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 fd9711d949
Rework and improve the decompress stream handler
The read buffer was changed into an iovec to avoid doing
too many binary concatenations and allocations.

Decompression happens transparently: when decoding gzip,
the content-encoding header is removed (we only decode
when "gzip" is the only encoding so nothing remains).

We always add a content_decoded key to the Req object.
This key contains a list of codings that were decoded,
in the reverse order in which they were. Currently it
can only be empty or contain <<"gzip">> but future
improvements or user handlers may see it contain more
values.

The option to disable decompression was renamed to
decompress_enabled and defaults to true.

It is no longer possible to enable/disable decompression
in the middle of reading the body: this ensures that the
data we pass forward is always valid.

Various smaller improvements were made to the code,
tests and manual pages.
2024-01-04 15:50:12 +01:00
.github/workflows Delete the master cache on cron 2023-12-18 11:42:52 +01:00
doc/src Rework and improve the decompress stream handler 2024-01-04 15:50:12 +01:00
ebin Add cowboy_decompress_h stream handler 2023-12-21 15:39:08 +01:00
examples Add UTF-8 support to example file_server 2023-12-07 15:31:11 +01:00
src Rework and improve the decompress stream handler 2024-01-04 15:50:12 +01:00
test Rework and improve the decompress stream handler 2024-01-04 15:50:12 +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 Use GitHub actions for testing Cowboy 2023-12-01 10:00:33 +01:00
LICENSE Update LICENSE copyright year 2022-07-12 16:38:41 +02:00
Makefile Remove unneeded Makefile variables 2023-12-04 11:11:54 +01:00
plugins.mk Document the commands based Websocket interface 2019-10-06 16:51:27 +02:00
README.asciidoc Remove official IRC channel 2023-12-06 12:46:40 +01:00
rebar.config Update Cowlib to 2.12.1 2023-03-29 15:20:48 +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

* https://github.com/ninenines/cowboy/issues[Issues tracker]
* https://ninenines.eu/services[Commercial Support]
* https://github.com/sponsors/essen[Sponsor me!]