twingly/twingly-url

Questions about valid URLs

twingly-mob opened this issue · 1 comments

What is a valid URL?

Today:

  • Addressable can parse it
  • PublicSuffix can parse it
  • scheme is http or https

What should be parseable?

Today:

  • Any valid URL (includes e.g. URLs with scheme ftp or gopher)

valid? and parse does not go hand in hand today, and it's problematic during development, it isn't clear how bugs should be solved.

Suggestion: What if URLs with non http schemes returned NullURL?

Ping @twingly/dev

We discussed this IRL and, to keep things simple, we will return NullURL for non http/https schemes.