lib/httpx/connection/http2.rb in httpx-0.12.0 vs lib/httpx/connection/http2.rb in httpx-0.13.0
- old
+ new
@@ -89,11 +89,10 @@
stream = @connection.new_stream
handle_stream(stream, request)
@streams[request] = stream
@max_requests -= 1
end
- request.once(:headers, &method(:set_protocol_headers))
handle(request, stream)
true
rescue HTTP2Next::Error::StreamLimitExceeded
@pending.unshift(request)
emit(:exhausted)
@@ -185,9 +184,10 @@
request.headers[":path"] = headline_uri(request)
request.headers[":authority"] = request.authority
end
def join_headers(stream, request)
+ set_protocol_headers(request)
log(level: 1, color: :yellow) do
request.headers.each.map { |k, v| "#{stream.id}: -> HEADER: #{k}: #{v}" }.join("\n")
end
stream.headers(request.headers.each, end_stream: request.empty?)
end