When trying to authenticate a user through Yahoo's OpenID service it fails instantly. The problem seemes to be caused by the library sending a RANGE HTTP request header, and receiving a 206 status code, while only accepting 200.
The problem can be fixed by either of the following ways:
Removing the following 2 lines (130-131) from the Auth_Yadis_ParanoidHTTPFetcher class's get method:
curl_setopt($c, CURLOPT_RANGE,
"0-".(1024 * Auth_OpenID_FETCHER_MAX_RESPONSE_KB));
Adjusting lines 335 and 364 to accept the 206 status code too.
if (!$response || ($response->status != 200)) {
and
if ((!$response) || ($response->status != 200)) {
to:
if (!$response || ($response->status != 200 && $response->status != 206)) {
and
if ((!$response) || ($response->status != 200 && $response->status != 206)) {
or other methods like in_array().
If using the second method, the code should be reviewed to see if the same problem can occur elsewhere.
If the purpose of the RANGE header is to avoid a possible DOS attack against the server, than method 2 would be preferable, but the 206 status code should be accepted everywhere.
I'm also attaching patches for both fixes.