Permalink
Browse files

Updated method of checking for empty

  • Loading branch information...
1 parent 2c709e3 commit 7a8e53d855d46f0e48bc78d99c81fc9620368489 @Mistagrooves Mistagrooves committed Feb 22, 2012
Showing with 7 additions and 7 deletions.
  1. +4 −0 rebar.bat
  2. +3 −7 src/ibrowse_http_client.erl
View
@@ -0,0 +1,4 @@
+@echo off
+setlocal
+set rebarscript=%~f0
+"C:\Program Files (x86)\erl5.8.4\bin\escript.exe" "%rebarscript:.bat=%" %*
@@ -562,17 +562,13 @@ do_send_body(Body, State, _TE) ->
do_send_body1(Source, Resp, State, TE) ->
case Resp of
- {ok, <<>>} ->
+ {ok, Data} when Data == []; Data == <<>> ->
do_send_body({Source}, State, TE);
- {ok, <<>>, New_source_state} ->
- do_send_body({Source, New_source_state}, State, TE);
- {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);
+ {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);

0 comments on commit 7a8e53d

Please sign in to comment.