mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
Fix conformance test error with log level 8
Fix: #70788 e2e conformance test completely passed with log level 5, but failed only with log level 8.
This commit is contained in:
parent
16d0992534
commit
c0cacd2525
@ -4302,13 +4302,13 @@ func (rt *extractRT) RoundTrip(req *http.Request) (*http.Response, error) {
|
|||||||
|
|
||||||
// headersForConfig extracts any http client logic necessary for the provided
|
// headersForConfig extracts any http client logic necessary for the provided
|
||||||
// config.
|
// config.
|
||||||
func headersForConfig(c *restclient.Config) (http.Header, error) {
|
func headersForConfig(c *restclient.Config, url *url.URL) (http.Header, error) {
|
||||||
extract := &extractRT{}
|
extract := &extractRT{}
|
||||||
rt, err := restclient.HTTPWrappersForConfig(c, extract)
|
rt, err := restclient.HTTPWrappersForConfig(c, extract)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if _, err := rt.RoundTrip(&http.Request{}); err != nil {
|
if _, err := rt.RoundTrip(&http.Request{URL: url}); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return extract.Header, nil
|
return extract.Header, nil
|
||||||
@ -4332,7 +4332,7 @@ func OpenWebSocketForURL(url *url.URL, config *restclient.Config, protocols []st
|
|||||||
url.Host += ":80"
|
url.Host += ":80"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
headers, err := headersForConfig(config)
|
headers, err := headersForConfig(config, url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to load http headers: %v", err)
|
return nil, fmt.Errorf("failed to load http headers: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user