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 @@ @@ -30,3 +30,8 @@
30 #ifndef DEBUG_PERSISTENT_CONNECTIONS 30 #ifndef DEBUG_PERSISTENT_CONNECTIONS
31 #define DEBUG_PERSISTENT_CONNECTIONS 0 31 #define DEBUG_PERSISTENT_CONNECTIONS 0
32 #endif 32 #endif
  33 +
  34 +// When set to 1, ASIHTTPRequests will print information about HTTP authentication (Basic, Digest or NTLM) to the console
  35 +#ifndef DEBUG_HTTP_AUTHENTICATION
  36 +#define DEBUG_HTTP_AUTHENTICATION 0
  37 +#endif
@@ -1113,7 +1113,7 @@ @@ -1113,7 +1113,7 @@
1113 err = [request error]; 1113 err = [request error];
1114 GHAssertNil(err,@"Failed to use stored credentials"); 1114 GHAssertNil(err,@"Failed to use stored credentials");
1115 1115
1116 - [ASIHTTPRequest removeCredentialsForHost:@"asi" port:0 protocol:@"http" realm:@"SECRET_STUFF"]; 1116 + [ASIHTTPRequest removeCredentialsForHost:@"allseeing-i.com" port:0 protocol:@"http" realm:@"SECRET_STUFF"];
1117 1117
1118 // Ensure credentials stored in the keychain were wiped 1118 // Ensure credentials stored in the keychain were wiped
1119 request = [[[ASIHTTPRequest alloc] initWithURL:url] autorelease]; 1119 request = [[[ASIHTTPRequest alloc] initWithURL:url] autorelease];
@@ -1434,7 +1434,7 @@ @@ -1434,7 +1434,7 @@
1434 { 1434 {
1435 ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/redirect_to_new_domain"]]; 1435 ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/redirect_to_new_domain"]];
1436 [request startSynchronous]; 1436 [request startSynchronous];
1437 - BOOL success = [[[request url] absoluteString] isEqualToString:@"http://www.apple.com"]; 1437 + BOOL success = [[[[request url] absoluteString] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/"]] isEqualToString:@"http://www.apple.com"];
1438 GHAssertTrue(success,@"Failed to redirect to a different domain"); 1438 GHAssertTrue(success,@"Failed to redirect to a different domain");
1439 } 1439 }
1440 1440