@@ -78,13 +78,13 @@ func serve(w http.ResponseWriter, r *http.Request, convert convertFunc) {
78
78
contentType := r .Header .Get ("Content-Type" )
79
79
serializer := getInputSerializer (contentType )
80
80
if serializer == nil {
81
- msg := fmt .Sprintf ("invalid Content-Type header `%s` " , contentType )
81
+ msg := fmt .Sprintf ("invalid Content-Type header %q " , contentType )
82
82
klog .Errorf (msg )
83
83
http .Error (w , msg , http .StatusBadRequest )
84
84
return
85
85
}
86
86
87
- klog .V (4 ).Infof ("Handling request body: \n %v " , string (body ))
87
+ klog .V (4 ).Infof ("Handling request body: \n %q " , string (body ))
88
88
obj , gvk , err := serializer .Decode (body , nil , nil )
89
89
if err != nil {
90
90
msg := fmt .Sprintf ("failed to deserialize body (%v) with error %v" , string (body ), err )
@@ -117,7 +117,7 @@ func serve(w http.ResponseWriter, r *http.Request, convert convertFunc) {
117
117
accept := r .Header .Get ("Accept" )
118
118
outSerializer := getOutputSerializer (accept )
119
119
if outSerializer == nil {
120
- msg := fmt .Sprintf ("invalid accept header `%s` " , accept )
120
+ msg := fmt .Sprintf ("invalid accept header %q " , accept )
121
121
klog .Errorf (msg )
122
122
http .Error (w , msg , http .StatusBadRequest )
123
123
return
@@ -130,7 +130,7 @@ func serve(w http.ResponseWriter, r *http.Request, convert convertFunc) {
130
130
http .Error (w , err .Error (), http .StatusInternalServerError )
131
131
return
132
132
}
133
- klog .V (4 ).Infof ("Sending response: \n %v " , responseBuffer .String ())
133
+ klog .V (4 ).Infof ("Sending response: \n %q " , responseBuffer .String ())
134
134
w .Write (responseBuffer .Bytes ())
135
135
}
136
136
0 commit comments