You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Strings a and b match against the regex, and both c and d do not. This matches my expectation that pathToRegexp is not meant to manage query parameter parsing without additional code.
Strings a, b, and c will all match against the regex, but d will not. I would expect c and d to both fail to match given the behavior in the previous example. The trailing / makes the difference: regexp visualization. The capture group intended to match the path param ends up also matching against the query with string c.
Is the issue here just that pathToRegexp is not designed to analyze request url's that have not had their query portion removed? Should I clean the query first?
The text was updated successfully, but these errors were encountered:
I encountered an inconsistency when constructing RegExp's for paths involving path parameters. Here is an example:
Strings
a
andb
match against the regex, and bothc
andd
do not. This matches my expectation that pathToRegexp is not meant to manage query parameter parsing without additional code.Strings
a
,b
, andc
will all match against the regex, butd
will not. I would expectc
andd
to both fail to match given the behavior in the previous example. The trailing/
makes the difference: regexp visualization. The capture group intended to match the path param ends up also matching against the query with stringc
.Is the issue here just that pathToRegexp is not designed to analyze request url's that have not had their query portion removed? Should I clean the query first?
The text was updated successfully, but these errors were encountered: