http-protocol 0.3.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 151c3fea62bb2e98bfa0908d3bf92d2bde7df365eb1a18dfc1dbad3cbcbffbf7
4
- data.tar.gz: 12e46a81b238a0dac626126e24b69465b04f52239eaa93d8437434a59ce1aaed
3
+ metadata.gz: 6878c2aaace06793d74e1e5d15672c8e6eec05603b270f180aa9c294d55318be
4
+ data.tar.gz: 9b95862aa4a58d6f536107d46c9f769e5e16b2168cebafe02fd5f6912dc09b10
5
5
  SHA512:
6
- metadata.gz: a2359f552602d478d331b57681b73bc280d26031eef6c555ad95ccacd7f156277040a550007915c7ec4980d472932c32fabb5631c15a8cf7e34079c38cae3f65
7
- data.tar.gz: 05307f4d29d0f2b43365a1c2e692f99e914f62afa70fb8b778c1af068c298ea1c8ed534eaf24ba59ea7c0d618d3b4f2e148959bcd75ee75901e868040fddcf8d
6
+ metadata.gz: f8781ccf5b026240587e2c57279043d814019bef9736a1779ea55e42da36e4cb5bb751b708d06be27b616342b318be263c69eb4d609d00d853568e361450bd81
7
+ data.tar.gz: 3c329fabfdfd669110d12ddd7b3a3153ea9625ddc4dfe44db5e0e316e5bca60065a00d68f299f6ea7f4ddf36c3766d012c36e8d819d685940afc3fd51d0827d6
@@ -24,8 +24,14 @@ module HTTP
24
24
  module Protocol
25
25
  module HTTP2
26
26
  module Continued
27
+ def initialize(*)
28
+ super
29
+
30
+ @continuation = nil
31
+ end
32
+
27
33
  def end_headers?
28
- @flags & END_HEADERS
34
+ flag_set?(END_HEADERS)
29
35
  end
30
36
 
31
37
  def read(io)
@@ -68,6 +74,14 @@ module HTTP
68
74
  @continuation = nil
69
75
  end
70
76
  end
77
+
78
+ def unpack
79
+ if @continuation.nil?
80
+ super
81
+ else
82
+ super + @continuation.unpack
83
+ end
84
+ end
71
85
  end
72
86
 
73
87
  # The CONTINUATION frame is used to continue a sequence of header block fragments. Any number of CONTINUATION frames can be sent, as long as the preceding frame is on the same stream and is a HEADERS, PUSH_PROMISE, or CONTINUATION frame without the END_HEADERS flag set.
@@ -49,10 +49,6 @@ module HTTP
49
49
  flag_set?(PRIORITY)
50
50
  end
51
51
 
52
- def end_headers?
53
- flag_set?(END_HEADERS)
54
- end
55
-
56
52
  def end_stream?
57
53
  flag_set?(END_STREAM)
58
54
  end
@@ -43,10 +43,6 @@ module HTTP
43
43
  TYPE = 0x5
44
44
  FORMAT = "N".freeze
45
45
 
46
- def end_headers?
47
- flag_set?(END_HEADERS)
48
- end
49
-
50
46
  def unpack
51
47
  data = super
52
48
 
@@ -20,6 +20,6 @@
20
20
 
21
21
  module HTTP
22
22
  module Protocol
23
- VERSION = "0.3.0"
23
+ VERSION = "0.3.1"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http-protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-09 00:00:00.000000000 Z
11
+ date: 2018-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http-hpack