mirror of
https://github.com/friendica/friendica
synced 2025-04-22 19:50:11 +00:00
Unified output via the "httpExit" function
This commit is contained in:
parent
d15023fe4b
commit
4a22034be6
16 changed files with 69 additions and 70 deletions
|
@ -22,6 +22,7 @@
|
|||
namespace Friendica\Module;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
|
@ -48,9 +49,7 @@ class PublicRSAKey extends BaseModule
|
|||
|
||||
Crypto::pemToMe($user['spubkey'], $modulus, $exponent);
|
||||
|
||||
header('Content-type: application/magic-public-key');
|
||||
echo 'RSA' . '.' . Strings::base64UrlEncode($modulus, true) . '.' . Strings::base64UrlEncode($exponent, true);
|
||||
|
||||
exit();
|
||||
$content = 'RSA' . '.' . Strings::base64UrlEncode($modulus, true) . '.' . Strings::base64UrlEncode($exponent, true);
|
||||
System::httpExit($content, Response::TYPE_BLANK, 'application/magic-public-key');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue