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

Build proper url instead of interpolating in Puma::DSL#port #2521

Merged
merged 1 commit into from Jan 4, 2021

Conversation

ojab
Copy link
Contributor

@ojab ojab commented Jan 3, 2021

Description

Fixes the issue with running puma handler with Host: '::1', right now we have a backtrace, since [::1] should be used as a hostname in URIs.

$ bundle exec rails s -u puma -b '::1'
=> Booting Puma
=> Rails 6.0.3.4 application starting in development
=> Run `rails server --help` for more startup options
Puma starting in single mode...
* Puma version: 5.1.1 (ruby 2.7.2-p137) ("At Your Service")
*  Min threads: 5
*  Max threads: 5
*  Environment: development
*          PID: 9014
Exiting
Traceback (most recent call last):
…
	10: from /home/ojab/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:327:in `start'
	 9: from /home/ojab/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/puma-5.1.1/lib/rack/handler/puma.rb:71:in `run'
	 8: from /home/ojab/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/puma-5.1.1/lib/puma/launcher.rb:182:in `run'
	 7: from /home/ojab/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/puma-5.1.1/lib/puma/single.rb:44:in `run'
	 6: from /home/ojab/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/puma-5.1.1/lib/puma/runner.rb:144:in `load_and_bind'
	 5: from /home/ojab/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/puma-5.1.1/lib/puma/binder.rb:152:in `parse'
	 4: from /home/ojab/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/puma-5.1.1/lib/puma/binder.rb:152:in `each'
	 3: from /home/ojab/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/puma-5.1.1/lib/puma/binder.rb:153:in `block in parse'
	 2: from /home/ojab/.rbenv/versions/2.7.2/lib/ruby/2.7.0/uri/common.rb:234:in `parse'
	 1: from /home/ojab/.rbenv/versions/2.7.2/lib/ruby/2.7.0/uri/rfc3986_parser.rb:73:in `parse'
/home/ojab/.rbenv/versions/2.7.2/lib/ruby/2.7.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?): "tcp://::1:3000" (URI::InvalidURIError)

Your checklist for this pull request

  • I have reviewed the guidelines for contributing to this repository.
  • I have added an entry to History.md if this PR fixes a bug or adds a feature. If it doesn't need an entry to HISTORY.md, I have added [changelog skip] or [ci skip] to the pull request title.
  • I have added appropriate tests if this PR fixes a bug or adds a feature.
  • My pull request is 100 lines added/removed or less so that it can be easily reviewed.
  • If this PR doesn't need tests (docs change), I added [ci skip] to the title of the PR.
  • If this closes any issues, I have added "Closes #issue" to the PR description or my commit messages.
  • I have updated the documentation accordingly.
  • All new and existing tests passed, including Rubocop.

@ojab ojab force-pushed the master branch 2 times, most recently from c9a00fa to 80cf09a Compare January 3, 2021 22:07
@ojab ojab marked this pull request as ready for review January 4, 2021 00:01
@ojab
Copy link
Contributor Author

ojab commented Jan 4, 2021

CI failures seems unerlated.

@nateberkopec
Copy link
Member

Cheers, makes sense. Needs a History.md entry.

@ojab ojab changed the title [changelog skip] Build proper url instead of interpolating in Puma::DSL#port Build proper url instead of interpolating in Puma::DSL#port Jan 4, 2021
@ojab
Copy link
Contributor Author

ojab commented Jan 4, 2021

:okay:, History.md entry added.

@nateberkopec
Copy link
Member

Thanks so much @ojab, welcome to the Puma contributor family 🤗

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

Successfully merging this pull request may close these issues.

None yet

2 participants