Skip to content
This repository
Browse code

Merge pull request #12 from romaonthego/master

Trim whitespace and new line characters
  • Loading branch information...
commit e4db8d1e303404bfcf73b264ed623ac95ae0cebc 2 parents aefbbf8 + f20839e
Rodrigo Sieiro authored October 22, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  RSOAuthEngine/RSOAuthEngine.m
2  RSOAuthEngine/RSOAuthEngine.m
@@ -301,7 +301,7 @@ - (void)fillTokenWithResponseBody:(NSString *)body type:(RSOAuthTokenType)tokenT
301 301
     for (NSString *pair in pairs)
302 302
     {
303 303
         NSArray *elements = [pair componentsSeparatedByString:@"="];
304  
-        NSString *key = [elements objectAtIndex:0];
  304
+        NSString *key = [[elements objectAtIndex:0] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
305 305
         NSString *value = [[elements objectAtIndex:1] urlDecodedString];
306 306
         
307 307
         if ([key isEqualToString:@"oauth_token"]) {

0 notes on commit e4db8d1

Please sign in to comment.
Something went wrong with that request. Please try again.