summaryrefslogtreecommitdiff
path: root/plugins/http/tests
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-27 16:08:27 +0300
committerValery Piashchynski <[email protected]>2020-11-27 16:08:27 +0300
commit6abfe73b5f7b66a7be094486e29ab3f2ab1ce940 (patch)
tree888b5eb96ab396ef53f77ce3944ed62af9cc878d /plugins/http/tests
parentb5020bfce6b5362400cb9b578fe32c1a6ed5d61a (diff)
Gzip plugin
Diffstat (limited to 'plugins/http/tests')
-rw-r--r--plugins/http/tests/configs/.rr-echoErr.yaml2
-rw-r--r--plugins/http/tests/configs/.rr-http.yaml2
-rw-r--r--plugins/http/tests/psr-worker.php23
3 files changed, 2 insertions, 25 deletions
diff --git a/plugins/http/tests/configs/.rr-echoErr.yaml b/plugins/http/tests/configs/.rr-echoErr.yaml
index 696fc0ae..6ecdbb2a 100644
--- a/plugins/http/tests/configs/.rr-echoErr.yaml
+++ b/plugins/http/tests/configs/.rr-echoErr.yaml
@@ -15,7 +15,7 @@ http:
debug: true
address: 127.0.0.1:8080
maxRequestSize: 1024
- middleware: [ "" ]
+ middleware: [ "pluginMiddleware", "pluginMiddleware2" ]
uploads:
forbid: [ "" ]
trustedSubnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ]
diff --git a/plugins/http/tests/configs/.rr-http.yaml b/plugins/http/tests/configs/.rr-http.yaml
index c907c5e7..7b91f735 100644
--- a/plugins/http/tests/configs/.rr-http.yaml
+++ b/plugins/http/tests/configs/.rr-http.yaml
@@ -15,7 +15,7 @@ http:
debug: true
address: 127.0.0.1:18903
maxRequestSize: 1024
- middleware: [ "" ]
+ middleware: [ "pluginMiddleware", "pluginMiddleware2" ]
uploads:
forbid: [ ".php", ".exe", ".bat" ]
trustedSubnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ]
diff --git a/plugins/http/tests/psr-worker.php b/plugins/http/tests/psr-worker.php
deleted file mode 100644
index 65fc6bde..00000000
--- a/plugins/http/tests/psr-worker.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * @var Goridge\RelayInterface $relay
- */
-use Spiral\Goridge;
-use Spiral\RoadRunner;
-
-ini_set('display_errors', 'stderr');
-require dirname(__DIR__) . "/../../vendor_php/autoload.php";
-
-$worker = new RoadRunner\Worker(new Goridge\StreamRelay(STDIN, STDOUT));
-$psr7 = new RoadRunner\PSR7Client($worker);
-
-while ($req = $psr7->acceptRequest()) {
- try {
- $resp = new \Zend\Diactoros\Response();
- $resp->getBody()->write("hello world");
-
- $psr7->respond($resp);
- } catch (\Throwable $e) {
- $psr7->getWorker()->error((string)$e);
- }
-} \ No newline at end of file