mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
apiserver: no Status in body for http 204
This commit is contained in:
parent
6047143f3e
commit
8902dae1c4
@ -103,6 +103,12 @@ func ErrorNegotiated(err error, s runtime.NegotiatedSerializer, gv schema.GroupV
|
|||||||
delay := strconv.Itoa(int(status.Details.RetryAfterSeconds))
|
delay := strconv.Itoa(int(status.Details.RetryAfterSeconds))
|
||||||
w.Header().Set("Retry-After", delay)
|
w.Header().Set("Retry-After", delay)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if code == http.StatusNoContent {
|
||||||
|
w.WriteHeader(code)
|
||||||
|
return code
|
||||||
|
}
|
||||||
|
|
||||||
WriteObjectNegotiated(s, gv, w, req, code, status)
|
WriteObjectNegotiated(s, gv, w, req, code, status)
|
||||||
return code
|
return code
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user