lib/http/2/stream.rb in http-2-0.9.1 vs lib/http/2/stream.rb in http-2-0.10.0
- old
+ new
@@ -89,10 +89,14 @@
on(:window) { |v| @remote_window = v }
on(:local_window) { |v| @local_window_max_size = @local_window = v }
end
+ def closed?
+ @state == :closed
+ end
+
# Processes incoming HTTP 2.0 frames. The frames must be decoded upstream.
#
# @param frame [Hash]
def receive(frame)
transition(frame, false)
@@ -142,9 +146,10 @@
end
end
end
# Sends a HEADERS frame containing HTTP response headers.
+ # All pseudo-header fields MUST appear in the header block before regular header fields.
#
# @param headers [Array or Hash] Array of key-value pairs or Hash
# @param end_headers [Boolean] indicates that no more headers will be sent
# @param end_stream [Boolean] indicates that no payload will be sent
def headers(headers, end_headers: true, end_stream: false)