Skip to content

Commit

Permalink
Merge pull request #60 from joanhey/server-software
Browse files Browse the repository at this point in the history
Server software
  • Loading branch information
joanhey authored Jan 4, 2024
2 parents 5c87ab1 + 7db9ce1 commit 9903634
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Adapterman.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@

namespace Adapterman;

use Workerman\Worker;
use Exception;

class Adapterman
{
public const VERSION = "0.6.1";

public const NAME = "Adapterman v". self::VERSION;
public const NAME = 'Adapterman/'. self::VERSION. ' (Workerman/'. Worker::VERSION. ')';

private const FUNCTIONS = [
'header',
Expand Down
4 changes: 2 additions & 2 deletions src/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public static function decode(string $recv_buffer, TcpConnection $connection): v
'SERVER_PORT' => $connection->getLocalPort(),
'REMOTE_ADDR' => $connection->getRemoteIp(),
'REMOTE_PORT' => $connection->getRemotePort(),
'SERVER_SOFTWARE' => 'workerman',
'SERVER_SOFTWARE' => Adapterman::NAME,
'SERVER_NAME' => '',
'HTTP_HOST' => '',
'HTTP_USER_AGENT' => '',
Expand Down Expand Up @@ -424,7 +424,7 @@ public static function decode(string $recv_buffer, TcpConnection $connection): v
'application/json' => $data = \json_decode($http_body, true) ?? [],
default => ''
};
$_REQUEST = \array_merge($_REQUEST, $data);
$_REQUEST = [...$_REQUEST, ...$data];
}

// HTTP_RAW_REQUEST_DATA HTTP_RAW_POST_DATA
Expand Down

0 comments on commit 9903634

Please sign in to comment.