fixes #1755

Fixed a bug where the trailing slash is not ignored when a query string is in use and the option stripTrailingSlash is enabled.