mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
return status code + 1000 for proxy errors
This commit is contained in:
parent
8504b43684
commit
f3d2ac3103
@ -75,6 +75,13 @@ get_http_version_string() const {
|
|||||||
// retrieval request. This will be in the 200 range if
|
// retrieval request. This will be in the 200 range if
|
||||||
// the document is successfully retrieved, or some other
|
// the document is successfully retrieved, or some other
|
||||||
// value in the case of an error.
|
// 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::
|
INLINE int HTTPChannel::
|
||||||
get_status_code() const {
|
get_status_code() const {
|
||||||
|
@ -686,6 +686,14 @@ run_proxy_reading_header() {
|
|||||||
|
|
||||||
if (!is_valid()) {
|
if (!is_valid()) {
|
||||||
// Proxy wouldn't open connection.
|
// 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;
|
_state = S_failure;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user