summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormikey99 <e_zine99@yahoo.com>2011-05-12 17:33:09 -0400
committermikey99 <e_zine99@yahoo.com>2011-05-12 17:33:09 -0400
commit42fcf059d2706d43daba2883274d26b8312e2e43 (patch)
treefcd76e1ac8364a614a51675dd124df605df69ed3
parent2c88dd7f95604f445f05976dd2d34847e065349f (diff)
downloadtor-42fcf059d2706d43daba2883274d26b8312e2e43.tar.gz
tor-42fcf059d2706d43daba2883274d26b8312e2e43.zip
Fixes ticket #2503
HTTPS error code 403 is now reported as: "The https proxy refused to allow connection". Used a switch statement for additional error codes to be explained in the future.
-rw-r--r--src/or/connection.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index fc2097f9a9..eaae791efc 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1504,10 +1504,20 @@ connection_read_https_proxy_response(connection_t *conn)
return 1;
}
/* else, bad news on the status code */
- log_warn(LD_NET,
- "The https proxy sent back an unexpected status code %d (%s). "
- "Closing.",
- status_code, escaped(reason));
+ switch (status_code) {
+ case 403:
+ log_warn(LD_NET,
+ "The https proxy refused to allow connection to %s "
+ "(status code %d, %s). Closing.",
+ conn->address, status_code, escaped(reason));
+ break;
+ default:
+ log_warn(LD_NET,
+ "The https proxy sent back an unexpected status code %d (%s). "
+ "Closing.",
+ status_code, escaped(reason));
+ break;
+ }
tor_free(reason);
return -1;
}