From fed1410b14ce284266b11c149f608bb49ed7ffbb Mon Sep 17 00:00:00 2001 From: Magnus Klaar Date: Fri, 16 Dec 2011 16:19:08 +0100 Subject: update type of resp_body to iodata resp_body is set by cowboy_http_req:set_resp_body/2 which accepts the input type iodata(). Update the resp_body field to use the same type. Also update the cowboy_http_req:has_resp_body/2 function to use the iolist_size/1 which works with both binary() and iolist() values instead of the byte_size/1 function which only works with binary() values. --- include/http.hrl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/http.hrl') diff --git a/include/http.hrl b/include/http.hrl index fd0eecc..e5311c4 100644 --- a/include/http.hrl +++ b/include/http.hrl @@ -68,7 +68,7 @@ %% Response. resp_state = waiting :: locked | waiting | chunks | done, resp_headers = [] :: http_headers(), - resp_body = <<>> :: binary(), + resp_body = <<>> :: iodata(), %% Functions. urldecode :: {fun((binary(), T) -> binary()), T} -- cgit v1.2.3