Skip to content

Commit 55c2c2d

Browse files
committed
Allow passing through configuration to underlying protocol.
1 parent 9ae1f17 commit 55c2c2d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/async/http/protocol/http1/connection.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ module HTTP
1414
module Protocol
1515
module HTTP1
1616
class Connection < ::Protocol::HTTP1::Connection
17-
def initialize(stream, version)
18-
super(stream)
17+
def initialize(stream, version, **options)
18+
super(stream, **options)
1919

20+
# On the client side, we need to send the HTTP version with the initial request. On the server side, there are some scenarios (bad request) where we don't know the request version. In those cases, we use this value, which is either hard coded based on the protocol being used, OR could be negotiated during the connection setup (e.g. ALPN).
2021
@version = version
2122
end
2223

lib/async/http/protocol/http2/connection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module HTTP2
2626
TRAILER = "trailer".freeze
2727

2828
module Connection
29-
def initialize(*)
29+
def initialize(...)
3030
super
3131

3232
@reader = nil

0 commit comments

Comments
 (0)