aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_router.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-11-11 13:57:26 +0100
committerLoïc Hoguin <[email protected]>2018-11-11 13:57:26 +0100
commitdd0fbab6b79e1cefa31adf6e9647f0d76bbade06 (patch)
tree595eb0d4ff3af00427598b8d2bb57c371b919d25 /src/cowboy_router.erl
parentd7b7580b3913c17b404319cc4c153748d5e59194 (diff)
downloadcowboy-dd0fbab6b79e1cefa31adf6e9647f0d76bbade06.tar.gz
cowboy-dd0fbab6b79e1cefa31adf6e9647f0d76bbade06.tar.bz2
cowboy-dd0fbab6b79e1cefa31adf6e9647f0d76bbade06.zip
Add automatic ranged request handling for bytes units
Returning the atom auto instead of a callback informs Cowboy that it needs to handle range requests automatically. This changes the behavior so that the ProvideCallback function is called and then Cowboy splits the data on its own and sends the response without any other user involvement other than defining the ranges_provided/2 callback. This is a quick and dirty way to add range request support to resources, and will be good enough for many cases including for cowboy_static as it also works when the normal response body is a sendfile tuple.
Diffstat (limited to 'src/cowboy_router.erl')
0 files changed, 0 insertions, 0 deletions