Browse Source

Don't convert chunks into binaries

Allow chunks to be IO lists. These lists will get flattened by the ERTS in
a much more efficient way than converting them to raw binaries in Erlang code.
pull/27/head
Filipe David Manana 14 years ago
parent
commit
74d6f70b44
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/ibrowse_http_client.erl

+ 1
- 1
src/ibrowse_http_client.erl View File

@ -543,7 +543,7 @@ do_send_body1(Source, Resp, State, TE) ->
maybe_chunked_encode(Data, false) ->
Data;
maybe_chunked_encode(Data, true) ->
[?dec2hex(size(to_binary(Data))), "\r\n", Data, "\r\n"].
[?dec2hex(iolist_size(Data)), "\r\n", Data, "\r\n"].
do_close(#state{socket = undefined}) -> ok;
do_close(#state{socket = Sock,

Loading…
Cancel
Save