Просмотр исходного кода

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 13 лет назад
Родитель
Сommit
eb8b62cf84
1 измененных файлов: 4 добавлений и 0 удалений
  1. +4
    -0
      src/ibrowse_http_client.erl

+ 4
- 0
src/ibrowse_http_client.erl Просмотреть файл

@ -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);

Загрузка…
Отмена
Сохранить