ruby / uri

URI is a module providing classes to handle Uniform Resource Identifiers
https://ruby.github.io/uri/
Other
86 stars 47 forks source link

using RFC_3986 with URI::Generic.build #104

Closed alexanderfletcher closed 4 months ago

alexanderfletcher commented 6 months ago

With URI::Generic you can pass in a custom parser (or the in built RFC_3986 one). However build uses the default parser. Would it be possible to extend the build method to allow to pass a parser in?

It's also a bit confusing that the parse methods uses RFC3986 while the build method uses the older RFC2396

gareth commented 6 months ago

I made a patch to address this on the ruby-lang bugs list a year ago, at the time I didn't realise that the URI library was maintained on Github.

I only just saw @jeremyevans' comment on that issue, so I'll port that patch over to Github tomorrow and submit it as a PR.

gareth commented 6 months ago

So my PR #105 doesn't exactly resolve this issue but does change the default parser for URI::Generic.build (with justification in the PR)