Merge pull request #547 from jbrennan/bugfix/httpclient-nil-url-exception
-[AFHTTPClient initWithBaseURL:] will now raise an exception with a nil URL parameter.
This commit is contained in:
commit
b118e93986
1 changed files with 4 additions and 0 deletions
|
|
@ -237,6 +237,10 @@ static NSString * AFPropertyListStringFromParameters(NSDictionary *parameters) {
|
|||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
if (!url) {
|
||||
[NSException raise:@"-[AFHTTPClient initWithBaseURL:] nil URL" format:@"`url` must not be nil"];
|
||||
}
|
||||
|
||||
// Ensure terminal slash for baseURL path, so that NSURL +URLWithString:relativeToURL: works as expected
|
||||
if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@"/"]) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue