{"action":"created","issue":{"url":"https://api.github.com/repos/twingly/twingly-url/issues/74","repository_url":"https://api.github.com/repos/twingly/twingly-url","labels_url":"https://api.github.com/repos/twingly/twingly-url/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/twingly/twingly-url/issues/74/comments","events_url":"https://api.github.com/repos/twingly/twingly-url/issues/74/events","html_url":"https://github.com/twingly/twingly-url/issues/74","id":126205592,"number":74,"title":"Only RFC 3986 compliant URLs should be valid?","user":{"login":"walro","id":2550510,"avatar_url":"https://avatars.githubusercontent.com/u/2550510?v=3","gravatar_id":"","url":"https://api.github.com/users/walro","html_url":"https://github.com/walro","followers_url":"https://api.github.com/users/walro/followers","following_url":"https://api.github.com/users/walro/following{/other_user}","gists_url":"https://api.github.com/users/walro/gists{/gist_id}","starred_url":"https://api.github.com/users/walro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walro/subscriptions","organizations_url":"https://api.github.com/users/walro/orgs","repos_url":"https://api.github.com/users/walro/repos","events_url":"https://api.github.com/users/walro/events{/privacy}","received_events_url":"https://api.github.com/users/walro/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/twingly/twingly-url/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-01-12T15:35:17Z","updated_at":"2016-06-15T23:02:58Z","closed_at":null,"body":"For example we, currently, deem the following url as valid:\r\n\r\n```ruby\r\nirb(main):002:0> Twingly::URL.parse(\"http://club].no/\").valid?\r\n=> true\r\n```\r\n\r\nBut the [RFC](https://tools.ietf.org/html/rfc3986#section-2.2) has `]` listed as a reserved character.\r\n\r\nstdlib's URI is a bit more restrictive here:\r\n\r\n```ruby\r\nirb(main):006:0> URI.parse(\"http://club].no\")\r\nURI::InvalidURIError: bad URI(is not URI?): http://club].no\r\n\tfrom /Users/robin/.rubies/ruby-2.2.3/lib/ruby/2.2.0/uri/rfc3986_parser.rb:66:in `split'\r\n\tfrom /Users/robin/.rubies/ruby-2.2.3/lib/ruby/2.2.0/uri/rfc3986_parser.rb:72:in `parse'\r\n\tfrom /Users/robin/.rubies/ruby-2.2.3/lib/ruby/2.2.0/uri/common.rb:226:in `parse'\r\n\tfrom (irb):6\r\n\tfrom /Users/robin/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/cli/console.rb:14:in `run'\r\n\tfrom /Users/robin/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/cli.rb:308:in `console'\r\n\tfrom /Users/robin/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'\r\n\tfrom /Users/robin/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'\r\n\tfrom /Users/robin/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'\r\n\tfrom /Users/robin/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'\r\n\tfrom /Users/robin/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/cli.rb:10:in `start'\r\n\tfrom /Users/robin/.gem/ruby/2.2.3/gems/bundler-1.10.6/bin/bundle:20:in `block in <top (required)>'\r\n\tfrom /Users/robin/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'\r\n\tfrom /Users/robin/.gem/ruby/2.2.3/gems/bundler-1.10.6/bin/bundle:18:in `<top (required)>'\r\n\tfrom /Users/robin/.gem/ruby/2.2.3/bin/bundle:23:in `load'\r\n\tfrom /Users/robin/.gem/ruby/2.2.3/bin/bundle:23:in `<main>'\r\n```"},"comment":{"url":"https://api.github.com/repos/twingly/twingly-url/issues/comments/226345251","html_url":"https://github.com/twingly/twingly-url/issues/74#issuecomment-226345251","issue_url":"https://api.github.com/repos/twingly/twingly-url/issues/74","id":226345251,"user":{"login":"dentarg","id":42626,"avatar_url":"https://avatars.githubusercontent.com/u/42626?v=3","gravatar_id":"","url":"https://api.github.com/users/dentarg","html_url":"https://github.com/dentarg","followers_url":"https://api.github.com/users/dentarg/followers","following_url":"https://api.github.com/users/dentarg/following{/other_user}","gists_url":"https://api.github.com/users/dentarg/gists{/gist_id}","starred_url":"https://api.github.com/users/dentarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dentarg/subscriptions","organizations_url":"https://api.github.com/users/dentarg/orgs","repos_url":"https://api.github.com/users/dentarg/repos","events_url":"https://api.github.com/users/dentarg/events{/privacy}","received_events_url":"https://api.github.com/users/dentarg/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T23:02:58Z","updated_at":"2016-06-15T23:02:58Z","body":"@sporkmonger it sounds like `sane?` would help a lot when passing on the URI to other libraries not using twingly-url or Addressable (i.e. they are using `URI.parse`)\r\n\r\n...but someday I hope that we can write our own HTTP wrapper-library that uses twingly-url, so we could try to visit even the iffy URIs :-)"}}
{"actor":{"display_login":"dentarg"}}