Per the spec, there is a single zlib stream for all name value pairs in one direction on a connection. The current implementation re-initializes a z-stream for each packet, which results in invalid stream errors:
/home/chris/repos/spdy/lib/spdy/compressor.rb:35:in `inflate': invalid stream (RuntimeError)
from /home/chris/repos/spdy/lib/spdy/parser.rb:51:in `unpack_control'
from /home/chris/repos/spdy/lib/spdy/parser.rb:81:in `try_parse'
from /home/chris/repos/spdy/lib/spdy/parser.rb:19:in `<<'
from ./npn_spdy_server.rb:47:in `receive_data'
from /home/chris/.rvm/gems/ruby-1.9.2-p180@spdy/gems/eventmachine-1.0.0.beta.3/lib/eventmachine.rb:206:in `run_machine'
from /home/chris/.rvm/gems/ruby-1.9.2-p180@spdy/gems/eventmachine-1.0.0.beta.3/lib/eventmachine.rb:206:in `run'
from ./npn_spdy_server.rb:66:in `<main>'
I am able to get zlib multi-packet deflating working with node.js and python, but not with FFI::Zlib in ruby.
A failing spec is here: 3123c3c. My latest failed effort at resolving this issue: http://japhr.blogspot.com/2011/05/zlibcontext-in-ruby-wip.html
i want to watch this
remove todo reference, closes #2
Looking good, thank you!