summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2015-08-13 10:45:02 +0900
committerKazuki Yamaguchi <k@rhe.jp>2015-08-13 10:45:02 +0900
commitad75dffe59fabc40d8e28347b7a5aa1baf07d9ac (patch)
tree1a8d945de9f94d73965ae6857129ce2e55950488
parent6af5416b16bdc2693fbf3a6f0686a136050ee52a (diff)
downloadplum-ad75dffe59fabc40d8e28347b7a5aa1baf07d9ac.tar.gz
hpack: huffman: padding must be shorter than 8 bits
-rw-r--r--lib/plum/hpack/huffman.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/plum/hpack/huffman.rb b/lib/plum/hpack/huffman.rb
index 2de8504..40fae59 100644
--- a/lib/plum/hpack/huffman.rb
+++ b/lib/plum/hpack/huffman.rb
@@ -11,7 +11,7 @@ module Plum
bytestr.each_byte do |b|
out << HUFFMAN_TABLE[b]
end
- out << "1" * (8 - (out.bytesize % 8))
+ out << "1" * ((8 - out.bytesize) % 8)
[out].pack("B*")
end