Merge pull request #48658 from CaoShuFeng/WriteHeader

Automatic merge from submit-queue (batch tested with PRs 46865, 48661, 48598, 48658, 48614)

remove extra WriteHeader function

The deleted two functions will be called later in the function
SerializeObject(). Not necessary to call them twice.

**Release note**:
```
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-07-12 03:02:20 -07:00 committed by GitHub
commit fee4421bf5

View File

@ -109,9 +109,6 @@ func WriteObjectNegotiated(ctx request.Context, s runtime.NegotiatedSerializer,
audit.LogResponseObject(ae, object, gv, s)
}
w.Header().Set("Content-Type", serializer.MediaType)
w.WriteHeader(statusCode)
encoder := s.EncoderForVersion(serializer.Serializer, gv)
SerializeObject(serializer.MediaType, encoder, w, req, statusCode, object)
}