summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-05-12 18:51:33 -0400
committerNick Mathewson <nickm@torproject.org>2011-05-12 18:51:33 -0400
commit696cd1cfe25e064ed3ceacf5ea5c7b18264873c6 (patch)
tree3b16a2575b40a31b2a3d6c71565f50206081560d
parent8fa7bcead5d8344b80ee295f3c1e0e15fd37ba87 (diff)
parent379de3d10acd45f02aa6c64f54de9b7faa634df5 (diff)
downloadtor-696cd1cfe25e064ed3ceacf5ea5c7b18264873c6.tar.gz
tor-696cd1cfe25e064ed3ceacf5ea5c7b18264873c6.zip
Merge remote-tracking branch 'origin/maint-0.2.2'
-rw-r--r--changes/bug25034
-rw-r--r--src/or/connection.c18
2 files changed, 18 insertions, 4 deletions
diff --git a/changes/bug2503 b/changes/bug2503
new file mode 100644
index 0000000000..50b8bf50c2
--- /dev/null
+++ b/changes/bug2503
@@ -0,0 +1,4 @@
+ o Minor features:
+ - When an HTTPS proxy reports "403 Forbidden", we now explain
+ what it means rather than calling it an unexpected status code.
+ Closes bug 2503. Patch from "mikey".
diff --git a/src/or/connection.c b/src/or/connection.c
index e7f2b0051d..20ab7091f2 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1547,10 +1547,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;
}