mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #45940 from sttts/sttts-204
Automatic merge from submit-queue (batch tested with PRs 42895, 45940) apiserver: no Status in body for http 204 Fixes http writer errors as with 204 we must not send any body. Needed downstream for https://github.com/openshift/origin/issues/14213.
This commit is contained in:
commit
e401dc7498
@ -103,6 +103,12 @@ func ErrorNegotiated(err error, s runtime.NegotiatedSerializer, gv schema.GroupV
|
||||
delay := strconv.Itoa(int(status.Details.RetryAfterSeconds))
|
||||
w.Header().Set("Retry-After", delay)
|
||||
}
|
||||
|
||||
if code == http.StatusNoContent {
|
||||
w.WriteHeader(code)
|
||||
return code
|
||||
}
|
||||
|
||||
WriteObjectNegotiated(s, gv, w, req, code, status)
|
||||
return code
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user