aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/plum.rb2
-rw-r--r--lib/plum/hpack/constants.rb (renamed from lib/plum/hpack.rb)0
-rw-r--r--lib/plum/stream.rb2
-rw-r--r--test/stream_test.rb6
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/plum.rb b/lib/plum.rb
index 693b895..bc29d0d 100644
--- a/lib/plum.rb
+++ b/lib/plum.rb
@@ -3,7 +3,7 @@ require "socket"
require "plum/version"
require "plum/error"
require "plum/binary_string"
-require "plum/hpack"
+require "plum/hpack/constants"
require "plum/hpack/huffman"
require "plum/hpack/context"
require "plum/hpack/decoder"
diff --git a/lib/plum/hpack.rb b/lib/plum/hpack/constants.rb
index 8a4f114..8a4f114 100644
--- a/lib/plum/hpack.rb
+++ b/lib/plum/hpack/constants.rb
diff --git a/lib/plum/stream.rb b/lib/plum/stream.rb
index 9e70992..e535a1f 100644
--- a/lib/plum/stream.rb
+++ b/lib/plum/stream.rb
@@ -265,7 +265,7 @@ module Plum
payload << frame.payload
end
- callback(:headers, @connection.hpack_decoder.decode(payload).to_h)
+ callback(:headers, @connection.hpack_decoder.decode(payload))
if first.flags.include?(:end_stream)
callback(:end_stream)
diff --git a/test/stream_test.rb b/test/stream_test.rb
index 819093f..fe23a85 100644
--- a/test/stream_test.rb
+++ b/test/stream_test.rb
@@ -112,7 +112,7 @@ class StreamTest < Minitest::Test
flags: [:end_headers],
payload: HPACK::Encoder.new(0).encode([[":path", "/"]])))
assert_equal(:open, stream.state)
- assert_equal({ ":path" => "/" }, headers)
+ assert_equal([[":path", "/"]], headers)
}
test.call {|stream|
@@ -131,7 +131,7 @@ class StreamTest < Minitest::Test
flags: [:end_headers],
payload: payload[5..-1]))
assert_equal(:half_closed_remote, stream.state)
- assert_equal({ ":path" => "/" }, headers)
+ assert_equal([[":path", "/"]], headers)
}
test.call {|stream|
@@ -144,7 +144,7 @@ class StreamTest < Minitest::Test
stream_id: stream.id,
flags: [:end_headers, :padded],
payload: "".push_uint8(payload.bytesize).push(payload).push("\x00"*payload.bytesize)))
- assert_equal({ ":path" => "/" }, headers)
+ assert_equal([[":path", "/"]], headers)
}
test.call {|stream|