Oh. I just saw that ``endsWith`` is already there, but it still looks susceptible to trailing slashes and query strings.