aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_tls_proxy_http2_connect.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-09-18 17:01:25 +0200
committerLoïc Hoguin <[email protected]>2020-09-21 15:52:26 +0200
commit8033850ab81ca0639489636bb8760d93900d4a80 (patch)
tree94c2df630a4c6fce97f6192a63a663a25f43266c /src/gun_tls_proxy_http2_connect.erl
parente740356b5881c39a95715d6081689802edf469a0 (diff)
downloadgun-8033850ab81ca0639489636bb8760d93900d4a80.tar.gz
gun-8033850ab81ca0639489636bb8760d93900d4a80.tar.bz2
gun-8033850ab81ca0639489636bb8760d93900d4a80.zip
Initial success for h2 CONNECT -> https CONNECT -> https
Diffstat (limited to 'src/gun_tls_proxy_http2_connect.erl')
-rw-r--r--src/gun_tls_proxy_http2_connect.erl10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gun_tls_proxy_http2_connect.erl b/src/gun_tls_proxy_http2_connect.erl
index c423571..70b4824 100644
--- a/src/gun_tls_proxy_http2_connect.erl
+++ b/src/gun_tls_proxy_http2_connect.erl
@@ -31,7 +31,10 @@
reply_to := pid(),
%% The full stream reference for this tunnel.
- stream_ref := reference() | [reference()]
+ stream_ref := gun:stream_ref(),
+
+ %% The full stream reference for the responsible HTTP/2 stream.
+ handle_continue_stream_ref := gun:stream_ref()
}.
name() -> tls_proxy_http2_connect.
@@ -47,8 +50,9 @@ connect(_, _, _, _) ->
error(not_implemented).
-spec send(socket(), iodata()) -> ok.
-send(#{gun_pid := GunPid, reply_to := ReplyTo, stream_ref := StreamRef}, Data) ->
- GunPid ! {handle_continue, StreamRef, {data, ReplyTo, StreamRef, nofin, Data}},
+send(S=#{gun_pid := GunPid, reply_to := ReplyTo, stream_ref := DataStreamRef,
+ handle_continue_stream_ref := StreamRef}, Data) ->
+ GunPid ! {handle_continue, StreamRef, {data, ReplyTo, DataStreamRef, nofin, Data}},
ok.
-spec setopts(_, _) -> no_return().