Ben Copsey

* Added DEBUG_HTTP_AUTHENTICATION

* Tweak ouput from all debug options, adding a label to make debug output easier to scan
* Tweak a couple of tests to make them more reliable
This diff is collapsed. Click to expand it.
... ... @@ -30,3 +30,8 @@
#ifndef DEBUG_PERSISTENT_CONNECTIONS
#define DEBUG_PERSISTENT_CONNECTIONS 0
#endif
// When set to 1, ASIHTTPRequests will print information about HTTP authentication (Basic, Digest or NTLM) to the console
#ifndef DEBUG_HTTP_AUTHENTICATION
#define DEBUG_HTTP_AUTHENTICATION 0
#endif
... ...
... ... @@ -1113,7 +1113,7 @@
err = [request error];
GHAssertNil(err,@"Failed to use stored credentials");
[ASIHTTPRequest removeCredentialsForHost:@"asi" port:0 protocol:@"http" realm:@"SECRET_STUFF"];
[ASIHTTPRequest removeCredentialsForHost:@"allseeing-i.com" port:0 protocol:@"http" realm:@"SECRET_STUFF"];
// Ensure credentials stored in the keychain were wiped
request = [[[ASIHTTPRequest alloc] initWithURL:url] autorelease];
... ... @@ -1434,7 +1434,7 @@
{
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/redirect_to_new_domain"]];
[request startSynchronous];
BOOL success = [[[request url] absoluteString] isEqualToString:@"http://www.apple.com"];
BOOL success = [[[[request url] absoluteString] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/"]] isEqualToString:@"http://www.apple.com"];
GHAssertTrue(success,@"Failed to redirect to a different domain");
}
... ...