net/url: Fixed url parsing with invalid slashes.

This PR addresses issue #9216, as well as updates a test for which
a compromise had to have been made earlier on.