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
Kubernetes Submit Queue 2018-04-27 13:23:05 -07:00 committed by GitHub
commit a8a963c983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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))
}
}