Skip to content

Commit

Permalink
Changed the name of header to use in Digest method.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Nov 13, 2010
1 parent 85607a9 commit 974161c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cake/libs/http/digest_method.php
Expand Up @@ -55,10 +55,10 @@ protected static function _getServerInformation(&$http) {
$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];
}
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/cases/libs/http/digest_method.test.php
Expand Up @@ -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;
}

}
Expand Down

0 comments on commit 974161c

Please sign in to comment.