diff options
author | Trevor Johns <trevor@tjohns.net> | 2007-12-30 01:50:02 +0000 |
---|---|---|
committer | Trevor Johns <trevor@tjohns.net> | 2007-12-30 01:50:02 +0000 |
commit | 0e2bf27cb6a4daab4c91f705f1ece9335bc00368 (patch) | |
tree | d5346d3e277ee3b70f130005e3497b72fa93b6ed /Auth | |
parent | c51724fca399948ff6906869065ee98866a79449 (diff) | |
download | php-openid-0e2bf27cb6a4daab4c91f705f1ece9335bc00368.zip php-openid-0e2bf27cb6a4daab4c91f705f1ece9335bc00368.tar.gz php-openid-0e2bf27cb6a4daab4c91f705f1ece9335bc00368.tar.bz2 |
[project @ Fixed discovery failure due to case-sensitive comparison of 'Location:' header]
If an HTTP redirect was issued during discovery with a 'Location:' header that
doesn't exactly match case (such as 'location:' or 'LOCATION:'), discovery
would fail. This is incorrect behavior per RFC 2616, Section 4.2.
This behavior is corrected by using a case insensitive compare when checking
for HTTP redirects.
Diffstat (limited to 'Auth')
-rw-r--r-- | Auth/Yadis/HTTPFetcher.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Auth/Yadis/HTTPFetcher.php b/Auth/Yadis/HTTPFetcher.php index 4b46140..7dffc78 100644 --- a/Auth/Yadis/HTTPFetcher.php +++ b/Auth/Yadis/HTTPFetcher.php @@ -85,7 +85,7 @@ class Auth_Yadis_HTTPFetcher { function _findRedirect($headers) { foreach ($headers as $line) { - if (strpos($line, "Location: ") === 0) { + if (stripos($line, "Location: ") === 0) { $parts = explode(" ", $line, 2); return $parts[1]; } |