Permalink
Browse files

refactor unpack_control

  • Loading branch information...
1 parent b7442b6 commit 6b68024626ebe59af1f02c83330e35bbdbe6af27 @jonasschneider committed Jan 4, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/spdy/parser.rb
View
@@ -43,9 +43,10 @@ def on_reset(&blk)
def unpack_control(pckt, data)
pckt.parse(data)
- if @on_headers && pckt.uncompressed_data.to_h != {}
+ headers = pckt.uncompressed_data.to_h
+ if @on_headers && !headers.empty?
@on_headers.call(pckt.header.stream_id.to_i,
- pckt.uncompressed_data.to_h)
+ headers)
end
end

0 comments on commit 6b68024

Please sign in to comment.