Permalink
Browse files

fix frame typo and broken pack_error logic

  • Loading branch information...
1 parent 80a188b commit de7ceb559b215e00b96a2af6d6bdda5e29f43e49 @igrigorik committed Mar 5, 2014
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/http/2/framer.rb
  2. +1 −1 lib/http/2/stream.rb
@@ -284,11 +284,11 @@ def parse(buf)
def pack_error(e)
if !e.is_a? Integer
- e = DEFINED_ERRORS[e]
-
- if e.nil?
+ if DEFINED_ERRORS[e].nil?
raise CompressionError.new("Unknown error ID for #{e}")
end
+
+ e = DEFINED_ERRORS[e]
end
[e].pack(UINT32)
@@ -355,7 +355,7 @@ def transition(frame, sending)
event(:remote_closed) if end_stream?(frame)
when :rst_stream then event(:remote_rst)
when :window_update, :priority
- frame[:igore] = true
+ frame[:ignore] = true
end
end

0 comments on commit de7ceb5

Please sign in to comment.