From 01f57ad65d7c75fb455f48e354bb3a328c472ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 7 Jan 2013 22:42:16 +0100 Subject: Add optional automatic response body compression This behavior can be enabled with the `compress` protocol option. See the `compress_response` example for more details. All tests are now ran with and without compression for both HTTP and HTTPS. --- .../src/compress_response_sup.erl | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 examples/compress_response/src/compress_response_sup.erl (limited to 'examples/compress_response/src/compress_response_sup.erl') diff --git a/examples/compress_response/src/compress_response_sup.erl b/examples/compress_response/src/compress_response_sup.erl new file mode 100644 index 0000000..d1bc312 --- /dev/null +++ b/examples/compress_response/src/compress_response_sup.erl @@ -0,0 +1,23 @@ +%% Feel free to use, reuse and abuse the code in this file. + +%% @private +-module(compress_response_sup). +-behaviour(supervisor). + +%% API. +-export([start_link/0]). + +%% supervisor. +-export([init/1]). + +%% API. + +-spec start_link() -> {ok, pid()}. +start_link() -> + supervisor:start_link({local, ?MODULE}, ?MODULE, []). + +%% supervisor. + +init([]) -> + Procs = [], + {ok, {{one_for_one, 10, 10}, Procs}}. -- cgit v1.2.3