http-2 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f37bf7f07706136db469b5c188cf13b2995d0c16
4
- data.tar.gz: e51aeb9218b11e3cada90485ba60b5342e89322f
3
+ metadata.gz: 60d5e715ae277807ca53b015a14a0e8c7f6676b7
4
+ data.tar.gz: 17c562bfb62b6db7209962ace7bd698a59fa2c91
5
5
  SHA512:
6
- metadata.gz: 45ca021e60dfe824fcc7bc6bf61d054ce37096a7f0f41ba7c1a5e45f89ad7848f37f4d6638f28d6a93bf6b41f28e8af66abfac28b4fe60d16556d82c1ec78ae3
7
- data.tar.gz: c5bddd633904cd5ff9aef237debbdbcc78a6b901dad857cd5aa770e8d13ea28e26c158c902f9b840185b4a8d7dfe7c8e2acd9b380991426f0b5abdbfa4bc2f2f
6
+ metadata.gz: c8d072f9ac4302506d4770fd48fa153567812b2beaa2e0bc4e1f3d04b0cc7560ebf7bd6bc22335e0465814a08a70cdca9f52546b62ffbc362edea5ecfaf41103
7
+ data.tar.gz: 950e2e78ff84257d62ddaf9d246b31e68689fd8125ee5fb180d239dbeaabe72d373c5a166353000a27d46f3f41c3924de19fa2287c195f7b75215204ae05e78f
data/.rspec CHANGED
@@ -2,3 +2,4 @@ autotest
2
2
  --color
3
3
  --format documentation
4
4
  --order rand
5
+ --warnings
@@ -49,9 +49,6 @@ module HTTP2
49
49
  # Connection state (:new, :closed).
50
50
  attr_reader :state
51
51
 
52
- # Last connection error if connection is aborted.
53
- attr_reader :error
54
-
55
52
  # Size of current connection flow control window (by default, set to
56
53
  # infinity, but is automatically updated on receipt of peer settings).
57
54
  attr_reader :local_window
@@ -95,6 +92,8 @@ module HTTP2
95
92
  @send_buffer = []
96
93
  @continuation = []
97
94
  @error = nil
95
+
96
+ @h2c_upgrade = nil
98
97
  end
99
98
 
100
99
  # Allocates new stream for current connection.
@@ -656,15 +655,18 @@ module HTTP2
656
655
  # permitted to open.
657
656
  stream.once(:active) { @active_stream_count += 1 }
658
657
  stream.once(:close) do
659
- @streams.delete id
660
658
  @active_stream_count -= 1
661
659
 
662
660
  # Store a reference to the closed stream, such that we can respond
663
661
  # to any in-flight frames while close is registered on both sides.
664
662
  # References to such streams will be purged whenever another stream
665
663
  # is closed, with a minimum of 15s RTT time window.
666
- @streams_recently_closed.delete_if { |_, v| (Time.now - v) > 15 }
667
664
  @streams_recently_closed[id] = Time.now
665
+ to_delete = @streams_recently_closed.select { |_, v| (Time.now - v) > 15 }
666
+ to_delete.each do |stream_id|
667
+ @streams.delete stream_id
668
+ @streams_recently_closed.delete stream_id
669
+ end
668
670
  end
669
671
 
670
672
  stream.on(:promise, &method(:promise)) if self.is_a? Server
@@ -1,3 +1,3 @@
1
1
  module HTTP2
2
- VERSION = '0.9.0'.freeze
2
+ VERSION = '0.9.1'.freeze
3
3
  end
@@ -543,6 +543,20 @@ RSpec.describe HTTP2::Connection do
543
543
  end.to raise_error(ProtocolError)
544
544
  end
545
545
 
546
+ it 'should not raise an error on frame for a closed stream ID' do
547
+ srv = Server.new
548
+ srv << CONNECTION_PREFACE_MAGIC
549
+
550
+ stream = srv.new_stream
551
+ stream.send HEADERS.dup
552
+ stream.send DATA.dup
553
+ stream.close
554
+
555
+ expect do
556
+ srv << f.generate(RST_STREAM.dup.merge(stream: stream.id))
557
+ end.to_not raise_error
558
+ end
559
+
546
560
  it 'should send GOAWAY frame on connection error' do
547
561
  stream = @conn.new_stream
548
562
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http-2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Grigorik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-02-08 00:00:00.000000000 Z
12
+ date: 2018-05-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler