mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +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:
		@@ -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
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user