]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/httpclient.php
OStatus: garbage collect unused PuSH subscriptions when the last local subscriber...
[quix0rs-gnu-social.git] / lib / httpclient.php
index 3f82620761c6eef8d953cc11fa9611addad5ba96..4c3af8d7dd950fd1b23a4988e3710f8148f93ef8 100644 (file)
@@ -81,12 +81,13 @@ class HTTPResponse extends HTTP_Request2_Response
     }
 
     /**
-     * Check if the response is OK, generally a 200 status code.
+     * Check if the response is OK, generally a 200 or other 2xx status code.
      * @return bool
      */
     function isOk()
     {
-        return ($this->getStatus() == 200);
+        $status = $this->getStatus();
+        return ($status >= 200 && $status < 300);
     }
 }