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

NameError: uninitialized constant HTTP2::Server::Base64 #75

Closed
HoneyryderChuck opened this issue Nov 15, 2016 · 3 comments
Closed

NameError: uninitialized constant HTTP2::Server::Base64 #75

HoneyryderChuck opened this issue Nov 15, 2016 · 3 comments

Comments

@HoneyryderChuck
Copy link
Collaborator

Here:

buf = HTTP2::Buffer.new Base64.urlsafe_decode64(settings.to_s)

I guess this has only been tested with the upgrade_server.rb example, as the require is being done there.

You can require the base64 lib in the server file and be done with it. However, you can also get away by unpacking the string, thereby bypassing require:

require "base64"
Base64.decode64(base64str)
# equals
base64str.unpack("m*")[0]
@igrigorik
Copy link
Owner

base64str.unpack("m*")[0]

sgtm. Do you want to make a patch for it? :)

@HoneyryderChuck
Copy link
Collaborator Author

sure :) can you tell me which variant do you prefer? I'll do it tomorrow.

@igrigorik
Copy link
Owner

.unpack sounds good to me.

HoneyryderChuck pushed a commit to HoneyryderChuck/http-2 that referenced this issue Nov 16, 2016
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

2 participants