]> Cypherpunks repositories - gostls13.git/commit
net/http: clean the path of the stripped URL by StripPrefix
authorGgicci <ggicci.t@gmail.com>
Mon, 11 Feb 2019 10:00:02 +0000 (18:00 +0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 26 Feb 2019 22:55:59 +0000 (22:55 +0000)
commitea65d015b838f2ca75debacacbbb039fe5e96b26
tree3d1e2b732c76b659372502653e806fb94ced0697
parent5a7e8f466e9becdb7277ac725b5540d6bd8e3727
net/http: clean the path of the stripped URL by StripPrefix

The path of the new stripped URL should also be cleaned. Since an empty path
may cause unexpected errors in some HTTP handlers, e.g. http.ServeFile.

Fixes #30165

Change-Id: Ib44fdce6388b5d62ffbcab5266925ef8f13f26e2
Reviewed-on: https://go-review.googlesource.com/c/161738
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/net/http/serve_test.go
src/net/http/server.go