Procházet zdrojové kódy

Merge pull request #63 from Mistagrooves/master

Returning empty bodies from the body generating function results in the end of the resource.
pull/65/head
Chandrashekhar Mullaparthi před 13 roky
rodič
revize
eb8b62cf84
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. +4
    -0
      src/ibrowse_http_client.erl

+ 4
- 0
src/ibrowse_http_client.erl Zobrazit soubor

@ -562,9 +562,13 @@ do_send_body(Body, State, _TE) ->
do_send_body1(Source, Resp, State, TE) ->
case Resp of
{ok, Data} when Data == []; Data == <<>> ->
do_send_body({Source}, State, TE);
{ok, Data} ->
do_send(maybe_chunked_encode(Data, TE), State),
do_send_body({Source}, State, TE);
{ok, Data, New_source_state} when Data == []; Data == <<>> ->
do_send_body({Source, New_source_state}, State, TE);
{ok, Data, New_source_state} ->
do_send(maybe_chunked_encode(Data, TE), State),
do_send_body({Source, New_source_state}, State, TE);

Načítá se…
Zrušit
Uložit