mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 03:33:26 +00:00
fix Log attempts to output resp.Body
This commit is contained in:
@@ -203,7 +203,7 @@ func ReadURL(url string, client *http.Client, header *http.Header) (body []byte,
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
klog.V(2).Infof("body of failing http response: %v", resp.Body)
|
||||
klog.V(2).InfoS("Failed to read URL", "statusCode", resp.StatusCode, "URL", url)
|
||||
return nil, &HTTPError{
|
||||
StatusCode: resp.StatusCode,
|
||||
URL: url,
|
||||
|
@@ -60,7 +60,7 @@ func ReadURL(url string, client *http.Client, header *http.Header) (body []byte,
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
klog.V(2).Infof("body of failing http response: %v", resp.Body)
|
||||
klog.V(2).InfoS("Failed to read URL", "statusCode", resp.StatusCode, "URL", url)
|
||||
return nil, &HTTPError{
|
||||
StatusCode: resp.StatusCode,
|
||||
URL: url,
|
||||
|
Reference in New Issue
Block a user