| Index: google_apis/gaia/oauth2_api_call_flow.cc
|
| diff --git a/google_apis/gaia/oauth2_api_call_flow.cc b/google_apis/gaia/oauth2_api_call_flow.cc
|
| index 08312ebe5d39ca65024b67b060a04c4910300ef7..07f32082817f34f6981a95577e9e2c4575ad63fb 100644
|
| --- a/google_apis/gaia/oauth2_api_call_flow.cc
|
| +++ b/google_apis/gaia/oauth2_api_call_flow.cc
|
| @@ -90,7 +90,8 @@ void OAuth2ApiCallFlow::EndApiCall(const net::URLFetcher* source) {
|
| return;
|
| }
|
|
|
| - if (source->GetResponseCode() != net::HTTP_OK) {
|
| + if (source->GetResponseCode() != net::HTTP_OK &&
|
| + source->GetResponseCode() != net::HTTP_NO_CONTENT) {
|
| state_ = ERROR_STATE;
|
| ProcessApiCallFailure(source);
|
| return;
|
| @@ -125,6 +126,10 @@ void OAuth2ApiCallFlow::EndMintAccessToken(
|
| }
|
| }
|
|
|
| +std::string OAuth2ApiCallFlow::CreateApiCallBodyContentType() {
|
| + return "application/x-www-form-urlencoded";
|
| +}
|
| +
|
| OAuth2AccessTokenFetcher* OAuth2ApiCallFlow::CreateAccessTokenFetcher() {
|
| return new OAuth2AccessTokenFetcherImpl(this, context_, refresh_token_);
|
| }
|
| @@ -166,7 +171,7 @@ URLFetcher* OAuth2ApiCallFlow::CreateURLFetcher() {
|
| result->SetAutomaticallyRetryOnNetworkChanges(3);
|
|
|
| if (!empty_body)
|
| - result->SetUploadData("application/x-www-form-urlencoded", body);
|
| + result->SetUploadData(CreateApiCallBodyContentType(), body);
|
|
|
| return result;
|
| }
|
|
|