Browse Source

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 years ago
parent
commit
eb8b62cf84
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/ibrowse_http_client.erl

+ 4
- 0
src/ibrowse_http_client.erl View File

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

Loading…
Cancel
Save