Test in Ostatus_profile if avatar is an image before writing to filesystem
This clears one FIXME... We also fix HTTPClient::quickGet() (and a related call in OStatus testfeed.php).
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user