http-2-next 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/http/2/next/emitter.rb +1 -1
- data/lib/http/2/next/header/decompressor.rb +2 -0
- data/lib/http/2/next/stream.rb +8 -3
- data/lib/http/2/next/version.rb +1 -1
- data/sig/next.rbs +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8fa01852fa00c35563fb999f007c1894c4b46a18a40d311d21908c42fc1b17f1
|
|
4
|
+
data.tar.gz: 7366509fdd22062f761abc7c4c6c46fa2e707ba953c17e3e86f449a67b5c38f1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8e6170d679b518d9de1fb1222d8a4c4996906e4a015a67d7418bb5c56af7c60e7551206303518612b16f19eddaaf1d50af96eb75d2611c7e4709a3f4401212c
|
|
7
|
+
data.tar.gz: 75c0652bc0b55feb14883841aa1119f4c0751ad5b435bd7e2de3443f8c6a354eaae25777c71c6fb1d9e35e90760af34c7a3319e418c5ccf5f44909f0741910c1
|
data/lib/http/2/next/emitter.rb
CHANGED
|
@@ -33,7 +33,7 @@ module HTTP2Next
|
|
|
33
33
|
# @param block [Proc] callback function
|
|
34
34
|
def emit(event, *args, &block)
|
|
35
35
|
listeners(event).delete_if do |cb|
|
|
36
|
-
cb.call(*args, &block)
|
|
36
|
+
:delete == cb.call(*args, &block) # rubocop:disable Style/YodaCondition
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
data/lib/http/2/next/stream.rb
CHANGED
|
@@ -88,7 +88,7 @@ module HTTP2Next
|
|
|
88
88
|
@state = state
|
|
89
89
|
@error = false
|
|
90
90
|
@closed = false
|
|
91
|
-
@_method = @_content_length = nil
|
|
91
|
+
@_method = @_content_length = @_status_code = nil
|
|
92
92
|
@_waiting_on_trailers = false
|
|
93
93
|
@received_data = false
|
|
94
94
|
|
|
@@ -126,12 +126,17 @@ module HTTP2Next
|
|
|
126
126
|
stream_error(:stream_closed) if (@state == :closed && @closed != :local_rst) ||
|
|
127
127
|
@state == :remote_closed
|
|
128
128
|
@_method ||= frame[:method]
|
|
129
|
+
@_status_code ||= frame[:status]
|
|
129
130
|
@_content_length ||= frame[:content_length]
|
|
130
131
|
@_trailers ||= frame[:trailer]
|
|
131
132
|
if @_waiting_on_trailers
|
|
132
133
|
verify_trailers(frame)
|
|
133
|
-
elsif @received_data
|
|
134
|
-
|
|
134
|
+
elsif @received_data &&
|
|
135
|
+
(!@_status_code || @_status_code >= 200)
|
|
136
|
+
|
|
137
|
+
# An endpoint that receives a HEADERS frame without the END_STREAM flag set after receiving a final
|
|
138
|
+
# (non-informational) status code MUST treat the corresponding request or response as malformed.
|
|
139
|
+
verify_trailers(frame)
|
|
135
140
|
end
|
|
136
141
|
emit(:headers, frame[:payload]) unless frame[:ignore]
|
|
137
142
|
@_waiting_on_trailers = !@_trailers.nil?
|
data/lib/http/2/next/version.rb
CHANGED
data/sig/next.rbs
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: http-2-next
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tiago Cardoso
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2021-
|
|
13
|
+
date: 2021-04-20 00:00:00.000000000 Z
|
|
14
14
|
dependencies: []
|
|
15
15
|
description: Pure-ruby HTTP 2.0 protocol implementation
|
|
16
16
|
email:
|
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
71
71
|
- !ruby/object:Gem::Version
|
|
72
72
|
version: '0'
|
|
73
73
|
requirements: []
|
|
74
|
-
rubygems_version: 3.2.
|
|
74
|
+
rubygems_version: 3.2.15
|
|
75
75
|
signing_key:
|
|
76
76
|
specification_version: 4
|
|
77
77
|
summary: Pure-ruby HTTP 2.0 protocol implementation
|