Made message signing in Cryptography use SHA512 as the message content for... #1
1 changed files with 16 additions and 0 deletions
|
@ -60,6 +60,10 @@
|
||||||
{
|
{
|
||||||
switch($clientRequest->getRequestType())
|
switch($clientRequest->getRequestType())
|
||||||
{
|
{
|
||||||
|
case RequestType::PING:
|
||||||
|
self::handlePingRequest();
|
||||||
|
break;
|
||||||
|
|
||||||
case RequestType::INFO:
|
case RequestType::INFO:
|
||||||
self::handleInformationRequest();
|
self::handleInformationRequest();
|
||||||
break;
|
break;
|
||||||
|
@ -87,6 +91,18 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles an incoming ping request by sending a successful HTTP response.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
private static function handlePingRequest(): void
|
||||||
|
{
|
||||||
|
http_response_code(200);
|
||||||
|
header('Content-Type: text/plain');
|
||||||
|
print('OK');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles an information request by setting the appropriate HTTP response code,
|
* Handles an information request by setting the appropriate HTTP response code,
|
||||||
* content type headers, and printing the server information in JSON format.
|
* content type headers, and printing the server information in JSON format.
|
||||||
|
|
Loading…
Add table
Reference in a new issue