diff options
author | Loïc Hoguin <[email protected]> | 2020-08-26 17:19:29 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-09-21 15:51:58 +0200 |
commit | 35d9f47fbcff23395c256b7814ce6af1d85129a2 (patch) | |
tree | 2bb4864409827488dd0c236d6983160e04937252 /src/gun_http2.erl | |
parent | 3de0604eec218996dad4db59c0cc96092cd7e0e7 (diff) | |
download | gun-35d9f47fbcff23395c256b7814ce6af1d85129a2.tar.gz gun-35d9f47fbcff23395c256b7814ce6af1d85129a2.tar.bz2 gun-35d9f47fbcff23395c256b7814ce6af1d85129a2.zip |
Add a gun:stream_ref() type and fix Dialyzer
Diffstat (limited to 'src/gun_http2.erl')
-rw-r--r-- | src/gun_http2.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gun_http2.erl b/src/gun_http2.erl index d8a84b4..6863b84 100644 --- a/src/gun_http2.erl +++ b/src/gun_http2.erl @@ -41,6 +41,7 @@ id = undefined :: cow_http2:streamid(), %% Reference used by the user of Gun to refer to this stream. + %% This may be only a part of a stream_ref() for tunneled streams. ref :: reference(), %% Process to send messages to. @@ -72,7 +73,7 @@ %% Base stream ref, defined when the protocol runs %% inside an HTTP/2 CONNECT stream. - base_stream_ref = undefined :: undefined | reference() | [reference()], + base_stream_ref = undefined :: undefined | gun:stream_ref(), %% Current status of the connection. We use this to ensure we are %% not sending the GOAWAY frame more than once, and to validate @@ -1050,7 +1051,7 @@ connect(State=#http2_state{socket=Socket, transport=Transport, opts=Opts, Authority = [Host, $:, integer_to_binary(Port)], PseudoHeaders = #{ method => <<"CONNECT">>, - authority => Authority + authority => iolist_to_binary(Authority) }, Headers1 = lists:keydelete(<<"host">>, 1, |