Unverified Commit a8a963c9 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #63238 from CaoShuFeng/toCurl

Automatic merge from submit-queue (batch tested with PRs 63153, 63238). 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>. fix curl header partially reverts kubernetes/kubernetes#60925 such command cause a 406 status code from api-server ``` curl -H "Accept: 'application/json;as=Table;v=v1beta1;g=meta.k8s.io, application/json'" ``` this works fine: ``` curl -H "Accept: application/json;as=Table;v=v1beta1;g=meta.k8s.io, application/json" ``` **Release note**: ``` NONE ```
parents 70e92884 084eb9b4
...@@ -331,7 +331,7 @@ func (r *requestInfo) toCurl() string { ...@@ -331,7 +331,7 @@ func (r *requestInfo) toCurl() string {
headers := "" headers := ""
for key, values := range r.RequestHeaders { for key, values := range r.RequestHeaders {
for _, value := range values { 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))
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment