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

Error in Addressable::URI.heuristic_parse for numeric domain + port #268

Closed
ZurgInq opened this issue Aug 28, 2017 · 1 comment
Closed

Comments

@ZurgInq
Copy link

ZurgInq commented Aug 28, 2017

Gem version 2.5.2

p Addressable::URI.heuristic_parse('127.0.0.1:8089', scheme: 'https').to_s
p Addressable::URI.heuristic_parse('random.dyndns.org', scheme: 'https').to_s
p Addressable::URI.heuristic_parse('random.dyndns.org:8089', scheme: 'https').to_s
p Addressable::URI.heuristic_parse('7777.example.org', scheme: 'https').to_s
p Addressable::URI.heuristic_parse('7777.example.org:8089', scheme: 'https').to_s

Output:

"https://127.0.0.1:8089"
"https://random.dyndns.org"
"https://random.dyndns.org:8089"
"https://7777.example.org"
/home/zurginq/.rvm/gems/ruby-2.3.1@monitoring/gems/addressable-2.5.2/lib/addressable/uri.rb:874:in `scheme=': Invalid scheme format: 7777.example.org (Addressable::URI::InvalidURIError)

For gem version 2.3.6 this works without errors

@ZurgInq ZurgInq changed the title heuristic_parse error for numeric domain + port Error in Addressable::URI.heuristic_parse for numeric domain + port Aug 28, 2017
@lagunoff
Copy link

#275 same issue

Mifrill added a commit to Mifrill/addressable that referenced this issue Apr 16, 2018
Mifrill added a commit to Mifrill/addressable that referenced this issue Apr 16, 2018
Mifrill added a commit to Mifrill/addressable that referenced this issue Apr 16, 2018
Mifrill added a commit to Mifrill/addressable that referenced this issue Apr 16, 2018
sporkmonger added a commit that referenced this issue May 31, 2018
fixes #268 Addressable::URI.heuristic_parse: uri starts with a digit …
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