aboutsummaryrefslogtreecommitdiffstats
path: root/include/http.hrl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-01-03 23:26:01 +0100
committerLoïc Hoguin <[email protected]>2012-01-03 23:39:45 +0100
commitbd8f31ed07f50d924788cb196fb4184accbfc4a2 (patch)
tree75984e557fe642dc3e2e74b8a0ae2e1c14c46aa3 /include/http.hrl
parent063f64a02a398336cdac08f3394905fd378adf60 (diff)
parent89870b22d9a27e40407ed037258b8b7dbf73aefa (diff)
downloadcowboy-bd8f31ed07f50d924788cb196fb4184accbfc4a2.tar.gz
cowboy-bd8f31ed07f50d924788cb196fb4184accbfc4a2.tar.bz2
cowboy-bd8f31ed07f50d924788cb196fb4184accbfc4a2.zip
Merge branch 'static-handler-split' of https://github.com/klaar/cowboy
Diffstat (limited to 'include/http.hrl')
-rw-r--r--include/http.hrl4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/http.hrl b/include/http.hrl
index 84b9489..c47a244 100644
--- a/include/http.hrl
+++ b/include/http.hrl
@@ -36,6 +36,8 @@
-type http_headers() :: list({http_header(), iodata()}).
-type http_cookies() :: list({binary(), binary()}).
-type http_status() :: non_neg_integer() | binary().
+-type http_resp_body() :: iodata() | {non_neg_integer(),
+ fun(() -> {sent, non_neg_integer()})}.
-record(http_req, {
%% Transport.
@@ -69,7 +71,7 @@
%% Response.
resp_state = waiting :: locked | waiting | chunks | done,
resp_headers = [] :: http_headers(),
- resp_body = <<>> :: iodata(),
+ resp_body = <<>> :: http_resp_body(),
%% Functions.
urldecode :: {fun((binary(), T) -> binary()), T}