aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gun_http.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gun_http.erl b/src/gun_http.erl
index 26761a8..ef8d720 100644
--- a/src/gun_http.erl
+++ b/src/gun_http.erl
@@ -94,7 +94,7 @@ handle(_, #http_state{streams=[]}) ->
%% Wait for the full response headers before trying to parse them.
handle(Data, State=#http_state{in=head, buffer=Buffer}) ->
Data2 = << Buffer/binary, Data/binary >>,
- case binary:match(Data, <<"\r\n\r\n">>) of
+ case binary:match(Data2, <<"\r\n\r\n">>) of
nomatch -> State#http_state{buffer=Data2};
{_, _} -> handle_head(Data2, State#http_state{buffer= <<>>})
end;