Explorar el Código

Updated method of checking for empty

pull/63/head
Mistagrooves hace 13 años
padre
commit
7a8e53d855
Se han modificado 2 ficheros con 7 adiciones y 7 borrados
  1. +4
    -0
      rebar.bat
  2. +3
    -7
      src/ibrowse_http_client.erl

+ 4
- 0
rebar.bat Ver fichero

@ -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 Ver fichero

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

Cargando…
Cancelar
Guardar