Permalink
Browse files

Update ab_actualPath to use CFURLCopyPath

This should be a little more reliable
  • Loading branch information...
1 parent 60f0c67 commit 0bf20a9a7bd85b351f951ab16e144a5265e45fd7 @nwg nwg committed Feb 22, 2013
Showing with 2 additions and 12 deletions.
  1. +2 −12 OAuth+Additions.m
View
@@ -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

0 comments on commit 0bf20a9

Please sign in to comment.