Browse Source

Updated method of checking for empty

pull/63/head
Mistagrooves 13 years ago
parent
commit
7a8e53d855
2 changed files with 7 additions and 7 deletions
  1. +4
    -0
      rebar.bat
  2. +3
    -7
      src/ibrowse_http_client.erl

+ 4
- 0
rebar.bat View File

@ -0,0 +1,4 @@
@echo off
setlocal
set rebarscript=%~f0
"C:\Program Files (x86)\erl5.8.4\bin\escript.exe" "%rebarscript:.bat=%" %*

+ 3
- 7
src/ibrowse_http_client.erl View File

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

Loading…
Cancel
Save