Parcourir la source

Updated method of checking for empty

pull/63/head
Mistagrooves il y a 13 ans
Parent
révision
7a8e53d855
2 fichiers modifiés avec 7 ajouts et 7 suppressions
  1. +4
    -0
      rebar.bat
  2. +3
    -7
      src/ibrowse_http_client.erl

+ 4
- 0
rebar.bat Voir le fichier

@ -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 Voir le fichier

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

Chargement…
Annuler
Enregistrer