return status code + 1000 for proxy errors

This commit is contained in:
David Rose 2002-10-19 16:12:55 +00:00
parent 8504b43684
commit f3d2ac3103
2 changed files with 15 additions and 0 deletions

View File

@ -75,6 +75,13 @@ get_http_version_string() const {
// retrieval request. This will be in the 200 range if
// the document is successfully retrieved, or some other
// value in the case of an error.
//
// Some proxy errors during an https-over-proxy request
// would return the same status code as a different
// error that occurred on the host server. To
// differentiate these cases, status codes that are
// returned by the proxy during the CONNECT phase
// (except code 407) are incremented by 1000.
////////////////////////////////////////////////////////////////////
INLINE int HTTPChannel::
get_status_code() const {

View File

@ -686,6 +686,14 @@ run_proxy_reading_header() {
if (!is_valid()) {
// Proxy wouldn't open connection.
// Change some of the status codes a proxy might return to
// differentiate them from similar status codes the destination
// server might have returned.
if (get_status_code() != 407) {
_status_code += 1000;
}
_state = S_failure;
return false;
}