Przeglądaj źródła

Updated method of checking for empty

pull/63/head
Mistagrooves 13 lat temu
rodzic
commit
7a8e53d855
2 zmienionych plików z 7 dodań i 7 usunięć
  1. +4
    -0
      rebar.bat
  2. +3
    -7
      src/ibrowse_http_client.erl

+ 4
- 0
rebar.bat Wyświetl plik

@ -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 Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz