Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Commit

Permalink
fixed response handling for setStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinwhittle committed Sep 22, 2009
1 parent a705e35 commit 41d9388
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Yahoo.inc
Expand Up @@ -77,6 +77,8 @@ $GLOBAL_YAHOO_SESSION = NULL;
$GLOBAL_YAHOO_LOGGER_DEBUG = false;
$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION = "LOG";

global $YahooConfig, $GLOBAL_YAHOO_SESSION, $GLOBAL_YAHOO_LOGGER_DEBUG, $GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION;

class YahooUtil {
function current_url() {
return sprintf("http://%s%s",$_SERVER["HTTP_HOST"],$_SERVER["REQUEST_URI"]);
Expand Down Expand Up @@ -1790,7 +1792,7 @@ class OAuthClient {
'responseHeaders' => $headerParser->headers,
'responseBody' => $response
);
if($response["code"] != 200) {
if($response["code"] >= 200 && $response["code"] < 300) {
YahooLogger::error("HTTP request failed", $response);

$this->checkExpired($response["code"], $headerParser);
Expand Down

0 comments on commit 41d9388

Please sign in to comment.