commit | 84e91e1d6b2fed3e19d69194067cc2797f503b95 | [log] [tgz] |
---|---|---|
author | Mark Theunissen <mark.theunissen@gmail.com> | Tue Jul 25 12:47:39 2017 +0200 |
committer | Russ Cox <rsc@golang.org> | Mon Oct 30 21:00:06 2017 +0000 |
tree | e54690049b9b52630e606d0c14cc2b05b080ddf0 | |
parent | b4c3fe7b049f79f81fae52d5006aa29b926bb4e0 [diff] |
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/51050 Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project does not use GitHub pull requests, and that we use the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.