mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix append rawqurey to the redirect location.
This commit is contained in:
parent
e931ff23d8
commit
6684186033
@ -20,7 +20,8 @@ func decodeJsonRequest(req *http.Request, data interface{}) error {
|
||||
|
||||
func redirect(hostname string, w http.ResponseWriter, req *http.Request) {
|
||||
path := req.URL.Path
|
||||
url := hostname + path
|
||||
query := req.URL.RawQuery
|
||||
url := hostname + path + "?" + query
|
||||
log.Debugf("Redirect to %s", url)
|
||||
http.Redirect(w, req, url, http.StatusTemporaryRedirect)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user