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

Question: Migration from RFC2396 make_regexp to RFC3986 #151

Open
svoop opened this issue Feb 12, 2025 · 0 comments
Open

Question: Migration from RFC2396 make_regexp to RFC3986 #151

svoop opened this issue Feb 12, 2025 · 0 comments

Comments

@svoop
Copy link

svoop commented Feb 12, 2025

I'm doing a bit of warn-housekeeping on Hanami which uses the following (without passing a schema) to match URIs in the asset handling:

ABSOLUTE_URL_MATCHER = URI::DEFAULT_PARSER.make_regexp

This triggers the obsolescence warning since the DEFAULT_PARSER has switched to RFC3986_PARSER which just delegates make_regexp back to the RFC2396_PARSER.

Is there a recommended path forward?

  1. URI::DEFAULT_PARSER.make_regexp --replace-with--> URI::RFC2396_PARSER.make_regexp
  2. URI::DEFAULT_PARSER.make_regexp --replace-with--> URI::RFC3986_Parser::RFC3986_URI

The warning suggest 1, but RFC2396 is obsolete, so rather 2? Or is there a third way? Thanks a lot for any hints!

(Update: Capybara uses the same URI::DEFAULT_PARSER.make_regexp as well, so the same question arises there.)

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

No branches or pull requests

1 participant