We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9dffa99 commit 5c338e3Copy full SHA for 5c338e3
lib/async/http/protocol/http2/response.rb
@@ -54,6 +54,11 @@ def receive_initial_headers(headers, end_stream)
54
@response.status = status
55
@headers = ::Protocol::HTTP::Headers.new
56
57
+ # If the protocol request was successful, ensure the response protocol matches:
58
+ if status == 200 and protocol = @response.request.protocol
59
+ @response.protocol = Array(protocol).first
60
+ end
61
+
62
headers.each do |key, value|
63
# It's guaranteed that this should be the first header:
64
if key == CONTENT_LENGTH
0 commit comments