aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2015-10-26 00:52:01 +0900
committerKazuki Yamaguchi <k@rhe.jp>2015-10-26 00:52:01 +0900
commitddd2416ecac3926a3dbdcc9ea24bbeb2566a05fd (patch)
treeba6c3f0464eddf24a252decf74db9d8e163c9178
parent23036473384e7503e765a46e0687fb5841741d8c (diff)
downloadplum-ddd2416ecac3926a3dbdcc9ea24bbeb2566a05fd.tar.gz
hpack/context: freeze String when storing to avoid unexpected modifications
-rw-r--r--lib/plum/hpack/context.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/plum/hpack/context.rb b/lib/plum/hpack/context.rb
index d15249a..e51b56f 100644
--- a/lib/plum/hpack/context.rb
+++ b/lib/plum/hpack/context.rb
@@ -17,7 +17,7 @@ module Plum
def store(name, value)
value = value.to_s
- @dynamic_table.unshift([name, value])
+ @dynamic_table.unshift([name.freeze, value.freeze])
@size += name.bytesize + value.bytesize + 32
evict
end