Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rentzsch/OAuthConsumer
Browse files Browse the repository at this point in the history
  • Loading branch information
rentzsch committed Aug 12, 2010
2 parents 6999d44 + 4daa38a commit 7ee2a48
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 9 deletions.
12 changes: 12 additions & 0 deletions .gitignore
@@ -0,0 +1,12 @@
# xcode noise
build
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3

# osx noise
.DS_Store
profile

Graphics
4 changes: 2 additions & 2 deletions Crypto/Base64Transcoder.c
Expand Up @@ -145,7 +145,7 @@ if (theRemainingBytes == 1)
if (theOutIndex % 74 == 72)
{
outOutputData[theOutIndex++] = '\r';
outOutputData[theOutIndex++] = '\n';
outOutputData[theOutIndex] = '\n';
}
}
else if (theRemainingBytes == 2)
Expand All @@ -157,7 +157,7 @@ else if (theRemainingBytes == 2)
if (theOutIndex % 74 == 72)
{
outOutputData[theOutIndex++] = '\r';
outOutputData[theOutIndex++] = '\n';
outOutputData[theOutIndex] = '\n';
}
}
return(true);
Expand Down
8 changes: 7 additions & 1 deletion NSMutableURLRequest+Parameters.m
Expand Up @@ -43,7 +43,13 @@ - (NSArray *)parameters
}

if ((encodedParameters == nil) || ([encodedParameters isEqualToString:@""]))
return nil;
{
if (shouldfree)
{
[encodedParameters release];
}
return nil;
}

NSArray *encodedParameterPairs = [encodedParameters componentsSeparatedByString:@"&"];
NSMutableArray *requestParameters = [[NSMutableArray alloc] initWithCapacity:16];
Expand Down
8 changes: 4 additions & 4 deletions NSString+URLEncoding.m
Expand Up @@ -30,21 +30,21 @@ @implementation NSString (OAURLEncodingAdditions)

- (NSString *)URLEncodedString
{
NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
NSString *result = (NSString *)NSMakeCollectable(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
(CFStringRef)self,
NULL,
CFSTR("!*'();:@&=+$,/?%#[]"),
kCFStringEncodingUTF8);
kCFStringEncodingUTF8));
[result autorelease];
return result;
}

- (NSString*)URLDecodedString
{
NSString *result = (NSString *)CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault,
NSString *result = (NSString *)NSMakeCollectable(CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault,
(CFStringRef)self,
CFSTR(""),
kCFStringEncodingUTF8);
kCFStringEncodingUTF8));
[result autorelease];
return result;
}
Expand Down
1 change: 0 additions & 1 deletion OADataFetcher.h
Expand Up @@ -32,7 +32,6 @@
@private
OAMutableURLRequest *request;
NSHTTPURLResponse *response;
NSURLConnection *connection;
NSError *error;
NSData *responseData;
id delegate;
Expand Down
2 changes: 2 additions & 0 deletions OADataFetcher.m
Expand Up @@ -52,13 +52,15 @@ - (void)fetchDataWithRequest:(OAMutableURLRequest *)aRequest
[delegate performSelector:didFailSelector
withObject:ticket
withObject:error];
[ticket release];
} else {
OAServiceTicket *ticket = [[OAServiceTicket alloc] initWithRequest:request
response:response
didSucceed:[(NSHTTPURLResponse *)response statusCode] < 400];
[delegate performSelector:didFinishSelector
withObject:ticket
withObject:responseData];
[ticket release];
}
}

Expand Down
2 changes: 1 addition & 1 deletion OAMutableURLRequest.m
Expand Up @@ -206,7 +206,7 @@ - (void)_generateNonce
{
CFUUIDRef theUUID = CFUUIDCreate(NULL);
CFStringRef string = CFUUIDCreateString(NULL, theUUID);
NSMakeCollectable(theUUID);
CFRelease(theUUID);
nonce = (NSString *)string;
}

Expand Down

0 comments on commit 7ee2a48

Please sign in to comment.