Fixes #83638 by checking if the url ends with "?" or not.
Merge pull request #157 from luisromangz/8.5-SNAPSHOT-83638

Fixes #83638 by checking if the url ends with "?" or not.