mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 22:58:50 +01:00
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.
This commit is contained in:
parent
2c88dd7f95
commit
42fcf059d2
1 changed files with 14 additions and 4 deletions
|
@ -1504,10 +1504,20 @@ connection_read_https_proxy_response(connection_t *conn)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
/* else, bad news on the status code */
|
/* else, bad news on the status code */
|
||||||
log_warn(LD_NET,
|
switch (status_code) {
|
||||||
"The https proxy sent back an unexpected status code %d (%s). "
|
case 403:
|
||||||
"Closing.",
|
log_warn(LD_NET,
|
||||||
status_code, escaped(reason));
|
"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);
|
tor_free(reason);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue