Changed the name of header to use in Digest method.

This commit is contained in:
Juan Basso 2010-11-13 21:47:25 -02:00
parent 85607a9963
commit 974161cf3a
2 changed files with 3 additions and 3 deletions

View file

@ -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];
}

View file

@ -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;
}
}