use Friendica\Core\Logger;
use Friendica\DI;
use Friendica\Model\Contact;
+use Friendica\Network\HTTPException\NotModifiedException;
class Network
{
$avatar['url'] = DI::baseUrl() . Contact::DEFAULT_AVATAR_PHOTO;
}
- Logger::log('Avatar: ' . $avatar['email'] . ' ' . $avatar['url'], Logger::DEBUG);
+ Logger::info('Avatar: ' . $avatar['email'] . ' ' . $avatar['url']);
return $avatar['url'];
}
*
* @param array $parsed URL parts
*
- * @return string The glued URL
+ * @return string The glued URL.
+ * @deprecated since version 2021.12, use a UriInterface object like GuzzleHttp\Psr7\Uri instead
*/
public static function unparseURL(array $parsed)
{
header('Last-Modified: ' . $last_modified);
if ($flag_not_modified) {
- header("HTTP/1.1 304 Not Modified");
- exit;
+ throw new NotModifiedException();
}
}