diff --git a/ASIHTTPRequest.podspec.json b/ASIHTTPRequest.podspec.json new file mode 100644 index 00000000..c41c59d2 --- /dev/null +++ b/ASIHTTPRequest.podspec.json @@ -0,0 +1,76 @@ +{ + "name": "ASIHTTPRequest", + "version": "1.8.2", + "summary": "Easy to use CFNetwork wrapper for HTTP requests, Objective-C, Mac OS X and iPhone.", + "homepage": "http://allseeing-i.com/ASIHTTPRequest", + "authors": { + "Ben Copsey": "ben@allseeing-i.com" + }, + "license": "New BSD License", + "source": { + "git": "https://github.com/pokeb/asi-http-request.git", + "tag": "v1.8.2" + }, + "description": "\n ASIHTTPRequest is an easy to use wrapper around the CFNetwork API that\n makes some of the more tedious aspects of communicating with web servers\n easier. It is written in Objective-C and works in both Mac OS X and iPhone\n applications.\n\n It is suitable performing basic HTTP requests and interacting with\n REST-based services (GET / POST / PUT / DELETE). The included\n ASIFormDataRequest subclass makes it easy to submit POST data and files\n using multipart/form-data.\n\n Please note that ASIHTTPRequest is not recommended for newer projects \n since it's not actively maintained anymore. \n For more info visit: http://allseeing-i.com/%5Brequest_release%5D\n ", + "requires_arc": false, + "subspecs": [ + { + "name": "Core", + "source_files": "Classes/*.{h,m}", + "ios": { + "dependencies": { + "Reachability": [ + + ] + }, + "frameworks": [ + "MobileCoreServices", + "CFNetwork", + "CoreGraphics" + ] + }, + "osx": { + "exclude_files": "**/*ASIAuthenticationDialog*", + "frameworks": [ + "SystemConfiguration", + "CoreServices" + ] + }, + "libraries": "z.1" + }, + { + "name": "ASIWebPageRequest", + "source_files": "Classes/ASIWebPageRequest/*.{h,m}", + "libraries": "xml2.2", + "xcconfig": { + "HEADER_SEARCH_PATHS": "\"$(SDKROOT)/usr/include/libxml2\"" + }, + "dependencies": { + "ASIHTTPRequest/Core": [ + + ] + } + }, + { + "name": "CloudFiles", + "source_files": [ + "Classes/CloudFiles/*.{h,m}", + "Classes/S3/ASINSXMLParserCompat.h" + ], + "dependencies": { + "ASIHTTPRequest/Core": [ + + ] + } + }, + { + "name": "S3", + "source_files": "Classes/S3/*.{h,m}", + "dependencies": { + "ASIHTTPRequest/Core": [ + + ] + } + } + ] +} diff --git a/Classes/ASIHTTPRequest.m b/Classes/ASIHTTPRequest.m index cb6bbeea..40787285 100644 --- a/Classes/ASIHTTPRequest.m +++ b/Classes/ASIHTTPRequest.m @@ -2540,8 +2540,9 @@ - (NSMutableDictionary *)findCredentials NSMutableDictionary *newCredentials = [[[NSMutableDictionary alloc] init] autorelease]; // First, let's look at the url to see if the username and password were included - NSString *user = [[self url] user]; - NSString *pass = [[self url] password]; + NSURLComponents *components = [NSURLComponents componentsWithURL:self.url resolvingAgainstBaseURL:NO]; + NSString *user = components.user; + NSString *pass = components.password; if (user && pass) {