aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_raw.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-10-21 19:15:48 +0200
committerLoïc Hoguin <[email protected]>2020-10-21 20:17:18 +0200
commit465d072abf4a76104d4562ed15345b27fe9a0cff (patch)
tree853338dc133fda51ed65e74dedc81f845dc090de /src/gun_raw.erl
parent69f19635df64ea48af3120c9685f7ad51b338f8f (diff)
downloadgun-465d072abf4a76104d4562ed15345b27fe9a0cff.tar.gz
gun-465d072abf4a76104d4562ed15345b27fe9a0cff.tar.bz2
gun-465d072abf4a76104d4562ed15345b27fe9a0cff.zip
Fix cookie handling when tunnel and origin schemes mismatch
The cookie_ignore_informational has been moved to http_opts and http2_opts. Also fix an issue when using 'protocols' in gun:open. When connecting via TLS the protocol's options were discarded.
Diffstat (limited to 'src/gun_raw.erl')
-rw-r--r--src/gun_raw.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gun_raw.erl b/src/gun_raw.erl
index 8d0aa42..11b875c 100644
--- a/src/gun_raw.erl
+++ b/src/gun_raw.erl
@@ -19,7 +19,7 @@
-export([opts_name/0]).
-export([has_keepalive/0]).
-export([init/4]).
--export([handle/4]).
+-export([handle/5]).
-export([closing/4]).
-export([close/4]).
-export([data/7]).
@@ -44,10 +44,10 @@ init(ReplyTo, Socket, Transport, Opts) ->
StreamRef = maps:get(stream_ref, Opts, undefined),
{connected_data_only, #raw_state{ref=StreamRef, reply_to=ReplyTo, socket=Socket, transport=Transport}}.
-handle(Data, State=#raw_state{ref=StreamRef, reply_to=ReplyTo}, _, EvHandlerState) ->
+handle(Data, State=#raw_state{ref=StreamRef, reply_to=ReplyTo}, CookieStore, _, EvHandlerState) ->
%% When we take over the entire connection there is no stream reference.
ReplyTo ! {gun_data, self(), StreamRef, nofin, Data},
- {{state, State}, EvHandlerState}.
+ {{state, State}, CookieStore, EvHandlerState}.
%% We can always close immediately.
closing(_, _, _, EvHandlerState) ->