Merge remote-tracking branch 'origin/maint-0.2.2'

This commit is contained in:
Nick Mathewson 2011-05-12 18:51:33 -04:00
commit 696cd1cfe2
2 changed files with 18 additions and 4 deletions

4
changes/bug2503 Normal file
View File

@ -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".

View File

@ -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;
}