From 8dfdac84c1325ebad90322f69ecc8ec16d831f84 Mon Sep 17 00:00:00 2001 From: Mistagrooves Date: Tue, 21 Feb 2012 12:49:45 -0500 Subject: [PATCH] A body generating function returning 0 data looks to the end server as the end of the entity which it shouldn't --- src/ibrowse_http_client.erl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ibrowse_http_client.erl b/src/ibrowse_http_client.erl index 81322fd..c01a12b 100644 --- a/src/ibrowse_http_client.erl +++ b/src/ibrowse_http_client.erl @@ -562,6 +562,10 @@ do_send_body(Body, State, _TE) -> do_send_body1(Source, Resp, State, TE) -> case Resp of + {ok, <<>>} -> + do_send_body({Source}, State, TE); + {ok, <<>>, New_source_state} -> + do_send_body({Source, New_source_state}, State, TE); {ok, Data} -> do_send(maybe_chunked_encode(Data, TE), State), do_send_body({Source}, State, TE);