mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 06:02:18 +00:00
/api/v1beta1/operations was returning Not Found
Splitting an empty string returns []string{""}, not []string{}
This commit is contained in:
@@ -42,6 +42,9 @@ func (s *APIServer) handleOperation(w http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
trimmed := strings.TrimLeft(req.URL.Path[len(opPrefix):], "/")
|
||||
parts := strings.Split(trimmed, "/")
|
||||
if trimmed == "" {
|
||||
parts = []string{}
|
||||
}
|
||||
if len(parts) > 1 {
|
||||
notFound(w, req)
|
||||
return
|
||||
|
Reference in New Issue
Block a user