mirror of https://github.com/k3s-io/k3s
Merge pull request #5240 from xudifsd/rm-double-write-in-apiserver-proxy
Redirector.ResourceLocation shouldn't return `"", nil`pull/6/head
commit
203f37a58a
|
@ -147,12 +147,6 @@ func (r *ProxyHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||||
httpCode = status.Code
|
httpCode = status.Code
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if location == "" {
|
|
||||||
httplog.LogOf(req, w).Addf("ResourceLocation for %v returned ''", id)
|
|
||||||
notFound(w, req)
|
|
||||||
httpCode = http.StatusNotFound
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
destURL, err := url.Parse(location)
|
destURL, err := url.Parse(location)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue