* @param string $uri Address that should be probed
* @param string $network Test for this specific network
* @param integer $uid User ID for the probe (only used for mails)
- * @param boolean $cache Use cached values?
*
* @return array uri data
* @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
- * @todo Choice: implement $cache parameter or remove documentation
*/
public static function uri(string $uri, string $network = '', int $uid = -1): array
{
use Friendica\Model\User;
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
use Friendica\Network\HTTPException;
-use Friendica\Network\HTTPException\BadRequestException;
use Friendica\Network\Probe;
use Friendica\Protocol\Delivery;
use Friendica\Util\Crypto;
if ($no_exit) {
return false;
} else {
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
}
} else {
if ($no_exit) {
return false;
} else {
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
}
if ($no_exit) {
return false;
} else {
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
}
if ($no_exit) {
return false;
} else {
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
}
if ($no_exit) {
return false;
} else {
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
}
if (!$base) {
Logger::notice('unable to locate salmon data in xml');
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
$key = self::key($author);
if (!$key) {
Logger::notice('Could not retrieve author key.');
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
$verify = Crypto::rsaVerify($signed_data, $signature, $key);
if (!$verify) {
Logger::notice('Message did not verify. Discarding.');
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
Logger::info('Message verified.');
$datarray['object-type'] = Activity\ObjectType::IMAGE;
$datarray['post-type'] = Item::PT_IMAGE;
} elseif ($data->poll) {
- $datarray['object-type'] = Activity\ObjectType::NOTE;
$datarray['post-type'] = Item::PT_POLL;
}