mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
more robust handling of socks authentication failures
This commit is contained in:
parent
56f35ece2d
commit
5e418ed57c
@ -944,9 +944,28 @@ run_socks_proxy_greet_reply() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: don't ignore the login method.
|
||||
|
||||
_state = S_socks_proxy_connect;
|
||||
if (reply[1] == (char)0xff) {
|
||||
downloader_cat.info()
|
||||
<< "Socks server does not accept our available login methods.\n";
|
||||
// We plug in the phony status code of 407 here, which is the HTTP
|
||||
// status code that indicates the proxy didn't like our
|
||||
// authentication. It's a close enough approximation.
|
||||
_status_code = 407;
|
||||
_state = S_try_next_proxy;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (reply[1] == 0x00) {
|
||||
// No login method required.
|
||||
_state = S_socks_proxy_connect;
|
||||
return false;
|
||||
}
|
||||
|
||||
// The server accepted a login method we didn't offer!
|
||||
downloader_cat.info()
|
||||
<< "Socks server accepted unrequested login method "
|
||||
<< (int)reply[1] << "\n";
|
||||
_state = S_try_next_proxy;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user