mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-23 05:37:13 +00:00
Merge pull request #60925 from aleksandra-malinowska/debug-curl-fix
Automatic merge from submit-queue (batch tested with PRs 60696, 60876, 60901, 60925, 60428). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Improve debug curl command When logging debug curl command, add single quotes around URL and headers. This prevents quietly removing any parameters after '&' when running resulting command and improves formatting. ```release-note NONE ``` Kubernetes-commit: de1a0e3249b67cd72c1a412a2688f693a0201b70
This commit is contained in:
commit
cc0ac3c0b2
1160
Godeps/Godeps.json
generated
1160
Godeps/Godeps.json
generated
File diff suppressed because it is too large
Load Diff
@ -331,11 +331,11 @@ func (r *requestInfo) toCurl() string {
|
||||
headers := ""
|
||||
for key, values := range r.RequestHeaders {
|
||||
for _, value := range values {
|
||||
headers += fmt.Sprintf(` -H %q`, fmt.Sprintf("%s: %s", key, value))
|
||||
headers += fmt.Sprintf(` -H %q`, fmt.Sprintf("%s: '%s'", key, value))
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Sprintf("curl -k -v -X%s %s %s", r.RequestVerb, headers, r.RequestURL)
|
||||
return fmt.Sprintf("curl -k -v -X%s %s '%s'", r.RequestVerb, headers, r.RequestURL)
|
||||
}
|
||||
|
||||
// debuggingRoundTripper will display information about the requests passing
|
||||
|
Loading…
Reference in New Issue
Block a user