summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/PSR7Client.php2
-rw-r--r--tests/http/server.php11
2 files changed, 11 insertions, 2 deletions
diff --git a/src/PSR7Client.php b/src/PSR7Client.php
index 350637e2..6b280272 100644
--- a/src/PSR7Client.php
+++ b/src/PSR7Client.php
@@ -132,8 +132,6 @@ class PSR7Client
$response->getBody()->__toString(),
json_encode(['status' => $response->getStatusCode(), 'headers' => $headers])
);
-
- $_SERVER = $this->originalServer;
}
/**
diff --git a/tests/http/server.php b/tests/http/server.php
new file mode 100644
index 00000000..e5b295b6
--- /dev/null
+++ b/tests/http/server.php
@@ -0,0 +1,11 @@
+<?php
+
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\ServerRequestInterface;
+
+function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface
+{
+ $resp->getBody()->write(strtoupper($req->getHeaderLine('input')));
+
+ return $resp->withAddedHeader("Header", $req->getQueryParams()['hello']);
+} \ No newline at end of file