Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update ab_actualPath to use CFURLCopyPath

This should be a little more reliable
  • Loading branch information...
commit 0bf20a9a7bd85b351f951ab16e144a5265e45fd7 1 parent 60f0c67
@nwg nwg authored
Showing with 2 additions and 12 deletions.
  1. +2 −12 OAuth+Additions.m
View
14 OAuth+Additions.m
@@ -28,18 +28,8 @@ + (NSDictionary *)ab_parseURLQueryString:(NSString *)query
- (NSString *)ab_actualPath
{
- NSString *urlString = [self absoluteString];
-
- NSRange range = [urlString rangeOfString:@"?"];
- if (range.location != NSNotFound) {
- urlString = [urlString substringToIndex:range.location];
- }
-
- if ([urlString hasSuffix:@"/"]) {
- return [NSString stringWithFormat:@"%@/", [self path]];
- }
-
- return [self path];
+ NSString* cfPath = [(NSString*)CFURLCopyPath((CFURLRef)self) autorelease];
+ return cfPath;
}
@end
Please sign in to comment.
Something went wrong with that request. Please try again.