Explicitly stating utf-8 when fetching oauth token
Fixes #2870 Signed-off-by: Eric Lin <linxiulei@gmail.com>
This commit is contained in:
parent
1a9b010de0
commit
2db0c6c262
@ -194,7 +194,11 @@ func (a *dockerAuthorizer) fetchTokenWithOAuth(ctx context.Context, to tokenOpti
|
|||||||
form.Set("password", to.secret)
|
form.Set("password", to.secret)
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := ctxhttp.PostForm(ctx, a.client, to.realm, form)
|
resp, err := ctxhttp.Post(
|
||||||
|
ctx, a.client, to.realm,
|
||||||
|
"application/x-www-form-urlencoded; charset=utf-8",
|
||||||
|
strings.NewReader(form.Encode()),
|
||||||
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user