Ver código fonte

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 anos atrás
pai
commit
74d6f70b44
1 arquivos alterados com 1 adições e 1 exclusões
  1. +1
    -1
      src/ibrowse_http_client.erl

+ 1
- 1
src/ibrowse_http_client.erl Ver arquivo

@ -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,

Carregando…
Cancelar
Salvar