Merge pull request #5325 from josharian/no-double-slash http: avoid generating double slashes in url