net/url: preserve leading slashes when resolving path
When doing resolvePath, if there are multiple leading slashes in the target, preserve them. This prevents an issue where the Go http.Client cleans up multiple leading slashes in the Location header in a redirect, resulting in a redirection to the incorrect target. Fixes #21158. Change-Id: I6a21ea61ca3bc7033f3c8a6ccc21ecaa3e996fa8 Reviewed-on: https://go-review.googlesource.com/51050Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org>
Showing
Please
register
or
sign in
to comment