]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/httpclient.php
Test in Ostatus_profile if avatar is an image before writing to filesystem
[quix0rs-gnu-social.git] / lib / httpclient.php
index 3e9f5d3ea746c562c9e5f6d42767d02cf389379b..6016f89314400e90059a1b93eaf232a9a482219c 100644 (file)
@@ -177,10 +177,12 @@ class HTTPClient extends HTTP_Request2
     /**
      * Quick static function to GET a URL
      */
-    public static function quickGet($url, $accept='text/html,application/xhtml+xml')
+    public static function quickGet($url, $accept=null)
     {
         $client = new HTTPClient();
-        $client->setHeader('Accept', $accept);
+        if (!is_null($accept)) {
+            $client->setHeader('Accept', $accept);
+        }
         $response = $client->get($url);
         if (!$response->isOk()) {
             // TRANS: Exception. %s is a profile URL.