Skip to content

Commit

Permalink
Merge pull request #3515 from callmeoldpince/automated-cherry-pick-of…
Browse files Browse the repository at this point in the history
…-#3505-upstream-release-1.3

Automated cherry pick of #3505: fix:search http response add content-type header
  • Loading branch information
karmada-bot authored May 10, 2023
2 parents 2420d1a + de1558e commit d7e7333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/registry/search/storage/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (r *SearchREST) newCacheHandler(info *genericrequest.RequestInfo, responder

return http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
enc := json.NewEncoder(rw)

rw.Header().Set("Content-Type", "application/json")
opts := metainternalversion.ListOptions{}
if err := searchscheme.ParameterCodec.DecodeParameters(req.URL.Query(), metav1.SchemeGroupVersion, &opts); err != nil {
rw.WriteHeader(http.StatusBadRequest)
Expand Down

0 comments on commit d7e7333

Please sign in to comment.