lib/httpx/connection/http2.rb in httpx-0.22.5 vs lib/httpx/connection/http2.rb in httpx-0.23.0

- old
+ new

@@ -206,11 +206,11 @@ end def set_protocol_headers(request) { ":scheme" => request.scheme, - ":method" => request.verb.to_s.upcase, + ":method" => request.verb, ":path" => request.path, ":authority" => request.authority, } end @@ -315,11 +315,11 @@ ex.set_backtrace(caller) response = ErrorResponse.new(request, ex, request.options) emit(:response, request, response) else response = request.response - if response && response.status == 421 + if response && response.is_a?(Response) && response.status == 421 ex = MisdirectedRequestError.new(response) ex.set_backtrace(caller) emit(:error, request, ex) else emit(:response, request, response) @@ -410,7 +410,6 @@ else close(:protocol_error, "ping payload did not match") end end end - Connection.register "h2", Connection::HTTP2 end