mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-08 04:22:40 +00:00
Fix proxy authentication when SSL is used
This commit is contained in:
parent
1af5d23e87
commit
e315fb6688
2 changed files with 10 additions and 0 deletions
|
@ -668,6 +668,13 @@ class HttpSocket extends CakeSocket {
|
|||
throw new SocketException(__d('cake_dev', 'The %s does not support proxy authentication.', $authClass));
|
||||
}
|
||||
call_user_func_array("$authClass::proxyAuthentication", array($this, &$this->_proxy));
|
||||
|
||||
if (!empty($this->request['header']['Proxy-Authorization'])) {
|
||||
$this->config['proxyauth'] = $this->request['header']['Proxy-Authorization'];
|
||||
if ($this->request['uri']['scheme'] === 'https') {
|
||||
$this->request['header'] = Hash::remove($this->request['header'], 'Proxy-Authorization');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue