Fix proxy authentication when SSL is used

This commit is contained in:
Richard van den Berg 2015-12-11 14:44:46 +01:00
parent 1af5d23e87
commit e315fb6688
2 changed files with 10 additions and 0 deletions

View file

@ -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');
}
}
}
/**