mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
adding support for the origin frame
This commit is contained in:
parent
ab67491a55
commit
e6ec9cb43e
@ -274,6 +274,9 @@ module HTTPX
|
||||
parser.on(:promise) do |request, stream|
|
||||
request.emit(:promise, parser, stream)
|
||||
end
|
||||
parser.on(:origin) do |origin|
|
||||
@origins << origin
|
||||
end
|
||||
parser.on(:close) do
|
||||
transition(:closing)
|
||||
end
|
||||
|
@ -107,6 +107,7 @@ module HTTPX
|
||||
@connection.on(:frame, &method(:on_frame))
|
||||
@connection.on(:frame_sent, &method(:on_frame_sent))
|
||||
@connection.on(:frame_received, &method(:on_frame_received))
|
||||
@connection.on(:origin, &method(:on_origin))
|
||||
@connection.on(:promise, &method(:on_promise))
|
||||
@connection.on(:altsvc) { |frame| on_altsvc(frame[:origin], frame) }
|
||||
@connection.on(:settings_ack, &method(:on_settings))
|
||||
@ -265,6 +266,10 @@ module HTTPX
|
||||
emit(:promise, @streams.key(stream.parent), stream)
|
||||
end
|
||||
|
||||
def on_origin(origin)
|
||||
emit(:origin, origin)
|
||||
end
|
||||
|
||||
def respond_to_missing?(meth, *args)
|
||||
@connection.respond_to?(meth, *args) || super
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user