http-2
http-2 copied to clipboard
Decompressor comment incorrect
trafficstars
In the HTTP2::Header::Decompressor class it has this comment:
# Responsible for decoding received headers and maintaining compression
# context of the opposing peer. Decompressor must be initialized with
# appropriate starting context based on local role: client or server.
#
# @example
# server_role = Decompressor.new(:request)
# client_role = Decompressor.new(:response)
Yet the constructor does not take any normal arguments, just an options hash:
def initialize(**options)
@cc = EncodingContext.new(options)
end
So if you try to initialize it as described, you'll get a wrong number of arguments error.
Good catch, ty for reporting it! Is this a documentation bug only, or does it affect some functionality you're looking to wire up?
As far as I know it's just a documentation bug. I've been able to decode header frames no problem, both on the client and on the server side.