Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #61 from thomasvl/update
Browse files Browse the repository at this point in the history
Add comment on why multiple types are checked
  • Loading branch information
thomasvl committed Mar 29, 2016
2 parents 3494d6a + b2a8a32 commit acf7384
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/GTMOAuth2Authentication.m
Expand Up @@ -741,7 +741,7 @@ - (GTMOAuth2Fetcher *)beginTokenFetchWithDelegate:(id)delegate
NSString *code = self.code;
NSString *assertion = self.assertion;
NSString *grantType = nil;

if (refreshToken) {
// We have a refresh token
grantType = @"refresh_token";
Expand Down Expand Up @@ -869,6 +869,7 @@ - (void)tokenFetcher:(GTMOAuth2Fetcher *)fetcher

NSDictionary *responseHeaders = [fetcher responseHeaders];
NSString *responseType = [responseHeaders valueForKey:@"Content-Type"];
// "text/javascript" supports Dropbox's out-of-spec OAuth 2.
BOOL isResponseJSON = ([responseType hasPrefix:@"application/json"] ||
[responseType hasPrefix:@"text/javascript"]);
BOOL hasData = ([data length] > 0);
Expand Down

0 comments on commit acf7384

Please sign in to comment.