Skip to content

Conversation

karenetheridge
Copy link
Contributor

Method ABNF is in https://datatracker.ietf.org/doc/html/rfc9110#appendix-A and equivalent to the regex: ^[a-zA-Z0-9!#$%&'*+.^_`|~-]+$

I couldn't find a good place to test this, as parse_env is only called from the cgi and psgi tests; open to suggestion and will happily add some.


# Query
$url->query->parse($env->{QUERY_STRING}) if $env->{QUERY_STRING};
$url->query->parse($env->{QUERY_STRING}) if defined $env->{QUERY_STRING};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

length may be a better test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, an empty Mojo::Parameters in the url object is equivalent to not having one defined at all.

The Method ABNF is in https://datatracker.ietf.org/doc/html/rfc9110#appendix-A
and is equivalent to the regex: ^[a-zA-Z0-9!#$%&'*+.^_`|~-]+$
@karenetheridge karenetheridge force-pushed the ether/zero-method-query branch from a114334 to c32767a Compare October 7, 2025 01:30
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

Successfully merging this pull request may close these issues.

2 participants