mirror of https://github.com/k3s-io/k3s
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 ```pull/8/head
commit
a8a963c983
|
@ -331,7 +331,7 @@ 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))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue