Skip to content

Commit

Permalink
ZooniverseClient: generateAuthorizationHeader: Use the correct (UTF8)…
Browse files Browse the repository at this point in the history
… encoding.

With this, the server reports a successful upload, but I don't see it yet
the uploads yet on my profile page:
http://www.galaxyzoo.org/#/profile/recents/1
Something else must be wrong. We already know that the server can report
success when the apiKey is wrong, for instance:
zooniverse/Galaxy-Zoo#184
However, in this case our Authentication header does seem to be
exactly the same as what android-galaxyzoo uses for the same login,
and that still works.
  • Loading branch information
murraycu committed May 18, 2015
1 parent 6d60ec2 commit 1736d6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ios-galaxyzoo/client/ZooniverseClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,10 @@ + (NSString *)getAnnotationPart:(NSInteger)sequence {
+ (NSString *)generateAuthorizationHeader:(NSString *)authName
authApiKey:(NSString *)authApiKey {
NSString *str = [NSString stringWithFormat:@"%@:%@", authName, authApiKey];
NSData *data = [str dataUsingEncoding:NSUnicodeStringEncoding];
NSData *data = [str dataUsingEncoding:NSUTF8StringEncoding];

NSString *result = [data base64EncodedStringWithOptions:0];
return result;
NSString *encoded = [data base64EncodedStringWithOptions:0];
return [NSString stringWithFormat:@"Basic %@", encoded];
}

- (void)uploadClassifications {
Expand Down

0 comments on commit 1736d6e

Please sign in to comment.