mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Changed the name of header to use in Digest method.
This commit is contained in:
parent
85607a9963
commit
974161cf3a
2 changed files with 3 additions and 3 deletions
|
@ -55,10 +55,10 @@ class DigestMethod {
|
|||
$http->request($http->request);
|
||||
$http->request = $originalRequest;
|
||||
|
||||
if (empty($http->response['header']['Www-Authenticate'])) {
|
||||
if (empty($http->response['header']['WWW-Authenticate'])) {
|
||||
return false;
|
||||
}
|
||||
preg_match_all('@(\w+)=(?:(?:")([^"]+)"|([^\s,$]+))@', $http->response['header']['Www-Authenticate'], $matches, PREG_SET_ORDER);
|
||||
preg_match_all('@(\w+)=(?:(?:")([^"]+)"|([^\s,$]+))@', $http->response['header']['WWW-Authenticate'], $matches, PREG_SET_ORDER);
|
||||
foreach ($matches as $match) {
|
||||
$http->config['request']['auth'][$match[1]] = $match[2];
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ class DigestHttpSocket extends HttpSocket {
|
|||
* @return void
|
||||
*/
|
||||
public function request($request) {
|
||||
$this->response['header']['Www-Authenticate'] = $this->nextHeader;
|
||||
$this->response['header']['WWW-Authenticate'] = $this->nextHeader;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue