Skip to content

Conversation

benjie
Copy link
Contributor

@benjie benjie commented Mar 10, 2015

/ and /?a route to the same place, but /? won't match any route and will trigger not found. This issue is not experienced with HistoryLocation in the browser because when the URL ends with ? then window.location.search == "" thereby dropping the question mark; however when using req.url in Node.js the ? is not automatically dropped.

I've fixed the issue via a tweak to the regex, and added a relevant test.

I'm not sure if we need to change extractQuery in PathUtils to return false if match[1].length === 0?

ryanflorence added a commit that referenced this pull request Mar 21, 2015
Empty query string ("/?") causes route match to fail
@ryanflorence ryanflorence merged commit f86aeca into remix-run:master Mar 21, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants