mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
get_proxy() is using "http://" which fools get_proxies_by_url() into thinking
the empty servername matches the unspecified (and empty) directhost (when no directhosts are specified) which messes up the proxy code. Fixed.
This commit is contained in:
parent
81d00c8bd6
commit
499d5a095f
@ -449,6 +449,7 @@ get_proxies_for_url(const URLSpec &url, pvector<URLSpec> &proxies) const {
|
||||
// First, check if the hostname matches any listed in direct_hosts.
|
||||
string hostname = url.get_server();
|
||||
|
||||
if (!hostname.empty()) { // skip if hostname is just an empty 'http://' scheme
|
||||
DirectHosts::const_iterator si;
|
||||
for (si = _direct_hosts.begin(); si != _direct_hosts.end(); ++si) {
|
||||
if ((*si).matches(hostname)) {
|
||||
@ -456,6 +457,7 @@ get_proxies_for_url(const URLSpec &url, pvector<URLSpec> &proxies) const {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now choose the appropriate proxy based on the scheme.
|
||||
string scheme = url.get_scheme();
|
||||
|
Loading…
x
Reference in New Issue
Block a user