http-2 1.2.0 → 1.2.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/connection.rb +0 -1
- data/lib/http/2/extensions.rb +9 -2
- data/lib/http/2/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d1db63e3235efa25ad18a270b128adc3955489766148712fd9405142d9cf1bd7
|
|
4
|
+
data.tar.gz: d3cfbb973cb9a3bc53466c106a6a33b6521f7ba8415d832a646ef96419c906cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a17f2bdcbc5fcd07ff0797994af22a0f170744f516702b5b5c2c8c032f60a15cf4c70869804c56f4e15e10829c2c51c8ea0fe5575751cf28b1fe0207389543a
|
|
7
|
+
data.tar.gz: e599eb9b1bfa7a4985b6a0f53fe1592e6d26ea780fc16d8471d23cc2abe5020a91e28fba80e1d227492525373dd117677e2c436bb289022875c3986f3733bb9e
|
data/lib/http/2/connection.rb
CHANGED
|
@@ -399,7 +399,6 @@ module HTTP2
|
|
|
399
399
|
unless @streams_recently_closed.key?(stream_id)
|
|
400
400
|
connection_error(:protocol_error, msg: "sent window update on idle stream")
|
|
401
401
|
end
|
|
402
|
-
stream = @streams_recently_closed[stream_id]
|
|
403
402
|
process_window_update(frame: frame, encode: true)
|
|
404
403
|
# Endpoints MUST ignore
|
|
405
404
|
# WINDOW_UPDATE or RST_STREAM frames received in this state (closed), though
|
data/lib/http/2/extensions.rb
CHANGED
|
@@ -26,9 +26,16 @@ module HTTP2
|
|
|
26
26
|
def read_str(str, n)
|
|
27
27
|
return "".b if n == 0
|
|
28
28
|
|
|
29
|
+
enc = str.encoding
|
|
30
|
+
|
|
31
|
+
if enc != Encoding::BINARY
|
|
32
|
+
str = str.dup if str.frozen?
|
|
33
|
+
str.force_encoding(Encoding::BINARY)
|
|
34
|
+
end
|
|
35
|
+
|
|
29
36
|
chunk = str.byteslice(0, n)
|
|
30
37
|
str.bytesplice(0, chunk.length, "")
|
|
31
|
-
chunk
|
|
38
|
+
chunk.force_encoding(Encoding::BINARY)
|
|
32
39
|
end
|
|
33
40
|
else
|
|
34
41
|
def read_str(str, n)
|
|
@@ -37,7 +44,7 @@ module HTTP2
|
|
|
37
44
|
chunk = str.byteslice(0, n)
|
|
38
45
|
remaining = str.byteslice(n, str.size - n)
|
|
39
46
|
remaining ? str.replace(remaining) : str.clear
|
|
40
|
-
chunk
|
|
47
|
+
chunk.force_encoding(Encoding::BINARY)
|
|
41
48
|
end
|
|
42
49
|
end
|
|
43
50
|
|
data/lib/http/2/version.rb
CHANGED