Server Options for Router: stripTrailingSlash doesn't work with query string #1755
When attempting to access a route on the hapi server supplying a query string, if the route is setup without a trailing slash and one is supplied it will fail. Even if the router option stripTrailingSlash is set to true.
The code located in the lib/request.js file within the internals.Request.prototype._setUrl method at line 163. It fails due when a query string is in place when it shifts back on the string one character to attempt to detect the slash. It will not find the slash but the last character of the query string.
I was able to get this fixed and I am happy to fork this and generate a pull request if you would like.
The text was updated successfully, but these errors were encountered: