private function createServerRequest(
		string $method, UriInterface $uri, array $headers, StreamInterface
		$inputStream, string $protocol, array $server, array $cookie, array $get, array $post
	) : ServerRequestInterface {
		$serverRequest = $this->httpFactory->createServerRequest(
			$method,
			$uri,
			$headers,
			$inputStream,
			$protocol,
			$server);

		foreach ($server as $key => $value) {
			if (preg_match('/^HTTP_(?P<header>.*)\Z/', $key, $matches)) {
				 if ($matches['header'] != 'HOST') {
					$serverRequest = $serverRequest->withAddedHeader(
						str_replace('_', '-', strtolower($matches['header'])),
						$value
					);
				 }
			}
		}

		return $serverRequest
			->withMethod($method)
			->withUri($uri)
			->withCookieParams($cookie)
			->withQueryParams($get)
			->withParsedBody($post);
	}