Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decompressor comment incorrect #155

Closed
sshock opened this issue Aug 7, 2020 · 2 comments
Closed

Decompressor comment incorrect #155

sshock opened this issue Aug 7, 2020 · 2 comments

Comments

@sshock
Copy link

sshock commented Aug 7, 2020

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.

@igrigorik
Copy link
Owner

Good catch, ty for reporting it! Is this a documentation bug only, or does it affect some functionality you're looking to wire up?

@sshock
Copy link
Author

sshock commented Aug 8, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants