summaryrefslogtreecommitdiffstats
path: root/web/server/h2o/libh2o/t/assets
diff options
context:
space:
mode:
Diffstat (limited to 'web/server/h2o/libh2o/t/assets')
-rw-r--r--web/server/h2o/libh2o/t/assets/.htpasswd1
-rw-r--r--web/server/h2o/libh2o/t/assets/doc_root/404.html1
-rw-r--r--web/server/h2o/libh2o/t/assets/doc_root/alice.txt31
-rw-r--r--web/server/h2o/libh2o/t/assets/doc_root/alice2.txt.gzbin0 -> 645 bytes
-rw-r--r--web/server/h2o/libh2o/t/assets/doc_root/esi.html1
-rw-r--r--web/server/h2o/libh2o/t/assets/doc_root/halfdome.jpgbin0 -> 481218 bytes
-rwxr-xr-xweb/server/h2o/libh2o/t/assets/doc_root/hello.cgi13
-rw-r--r--web/server/h2o/libh2o/t/assets/doc_root/hello.php6
-rw-r--r--web/server/h2o/libh2o/t/assets/doc_root/index.js1
-rw-r--r--web/server/h2o/libh2o/t/assets/doc_root/index.txt1
-rw-r--r--web/server/h2o/libh2o/t/assets/doc_root/index.txt.br2
-rw-r--r--web/server/h2o/libh2o/t/assets/doc_root/index.txt.gzbin0 -> 26 bytes
-rw-r--r--web/server/h2o/libh2o/t/assets/doc_root/issues/951.php11
-rwxr-xr-xweb/server/h2o/libh2o/t/assets/doc_root/printenv.cgi9
-rw-r--r--web/server/h2o/libh2o/t/assets/doc_root/subdir/index.txt1
-rw-r--r--web/server/h2o/libh2o/t/assets/session_tickets.yaml12
-rw-r--r--web/server/h2o/libh2o/t/assets/upstream.psgi225
17 files changed, 315 insertions, 0 deletions
diff --git a/web/server/h2o/libh2o/t/assets/.htpasswd b/web/server/h2o/libh2o/t/assets/.htpasswd
new file mode 100644
index 000000000..ae2071650
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/.htpasswd
@@ -0,0 +1 @@
+dankogai:$apr1$UZu91fLT$LZuXFeu3wSYdgLY6Wez5m/
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/404.html b/web/server/h2o/libh2o/t/assets/doc_root/404.html
new file mode 100644
index 000000000..1990b40f9
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/404.html
@@ -0,0 +1 @@
+hi I fixed ur webpage
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/alice.txt b/web/server/h2o/libh2o/t/assets/doc_root/alice.txt
new file mode 100644
index 000000000..adace8072
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/alice.txt
@@ -0,0 +1,31 @@
+Alice was beginning to get very tired of sitting by her sister on the
+bank, and of having nothing to do: once or twice she had peeped into the
+book her sister was reading, but it had no pictures or conversations in
+it, 'and what is the use of a book,' thought Alice 'without pictures or
+conversations?'
+
+So she was considering in her own mind (as well as she could, for the
+hot day made her feel very sleepy and stupid), whether the pleasure
+of making a daisy-chain would be worth the trouble of getting up and
+picking the daisies, when suddenly a White Rabbit with pink eyes ran
+close by her.
+
+There was nothing so VERY remarkable in that; nor did Alice think it so
+VERY much out of the way to hear the Rabbit say to itself, 'Oh dear!
+Oh dear! I shall be late!' (when she thought it over afterwards, it
+occurred to her that she ought to have wondered at this, but at the time
+it all seemed quite natural); but when the Rabbit actually TOOK A WATCH
+OUT OF ITS WAISTCOAT-POCKET, and looked at it, and then hurried on,
+Alice started to her feet, for it flashed across her mind that she had
+never before seen a rabbit with either a waistcoat-pocket, or a watch
+to take out of it, and burning with curiosity, she ran across the field
+after it, and fortunately was just in time to see it pop down a large
+rabbit-hole under the hedge.
+
+In another moment down went Alice after it, never once considering how
+in the world she was to get out again.
+
+The rabbit-hole went straight on like a tunnel for some way, and then
+dipped suddenly down, so suddenly that Alice had not a moment to think
+about stopping herself before she found herself falling down a very deep
+well.
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/alice2.txt.gz b/web/server/h2o/libh2o/t/assets/doc_root/alice2.txt.gz
new file mode 100644
index 000000000..42ff445da
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/alice2.txt.gz
Binary files differ
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/esi.html b/web/server/h2o/libh2o/t/assets/doc_root/esi.html
new file mode 100644
index 000000000..fea3eec6d
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/esi.html
@@ -0,0 +1 @@
+Hello to the <esi:include src="echo-query?world" />, from <esi:include src="echo-query?H2O" />!
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/halfdome.jpg b/web/server/h2o/libh2o/t/assets/doc_root/halfdome.jpg
new file mode 100644
index 000000000..4e96991a0
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/halfdome.jpg
Binary files differ
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/hello.cgi b/web/server/h2o/libh2o/t/assets/doc_root/hello.cgi
new file mode 100755
index 000000000..4401481bf
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/hello.cgi
@@ -0,0 +1,13 @@
+#! /usr/bin/env perl
+
+use strict;
+use warnings;
+use CGI;
+
+my $q = CGI->new;
+
+print $q->header("text/plain; charset=utf-8");
+print "Hello ", $q->param("name") || "unknown";
+
+close STDOUT;
+print STDERR "hello.cgi is shutting down\n";
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/hello.php b/web/server/h2o/libh2o/t/assets/doc_root/hello.php
new file mode 100644
index 000000000..905beefec
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/hello.php
@@ -0,0 +1,6 @@
+<?php
+if (isset($_GET['link'])) {
+ header('Link: ' . $_GET['link']);
+}
+echo "hello world";
+?>
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/index.js b/web/server/h2o/libh2o/t/assets/doc_root/index.js
new file mode 100644
index 000000000..3254c9294
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/index.js
@@ -0,0 +1 @@
+alert("hello");
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/index.txt b/web/server/h2o/libh2o/t/assets/doc_root/index.txt
new file mode 100644
index 000000000..ce0136250
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/index.txt
@@ -0,0 +1 @@
+hello
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/index.txt.br b/web/server/h2o/libh2o/t/assets/doc_root/index.txt.br
new file mode 100644
index 000000000..b931f4d7a
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/index.txt.br
@@ -0,0 +1,2 @@
+‹€hello
+ \ No newline at end of file
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/index.txt.gz b/web/server/h2o/libh2o/t/assets/doc_root/index.txt.gz
new file mode 100644
index 000000000..c15976b94
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/index.txt.gz
Binary files differ
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/issues/951.php b/web/server/h2o/libh2o/t/assets/doc_root/issues/951.php
new file mode 100644
index 000000000..871b47765
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/issues/951.php
@@ -0,0 +1,11 @@
+<?php
+header("Cache-Control: no-cache");
+header("Strict-Transport-Security: max-age=31536000; includeSubDomains");
+header("X-Content-Type-Options: nosniff");
+header("X-XSS-Protection: 1; mode=block");
+header("Content-Security-Policy: default-src 'self' data: *.fortifi.cloud *.fortifi.io *.fortifiio.xyz *.fortifi.xyz *.fortifi.me:* https://storage.googleapis.com/cdn.fortifi.co/ https://maxcdn.bootstrapcdn.com/font-awesome/ https://www.google.com/ https://www.youtube.com/ https://ajax.googleapis.com/ https://www.gstatic.com https://maps.googleapis.com https://static.twilio.com/libs/ https://*.static.twilio.com/ https://www.google-analytics.com *.fortel.li *.fortel.fortifi.me; style-src 'self' data: *.fortifi.cloud *.fortifi.io *.fortifiio.xyz *.fortifi.xyz *.fortifi.me:* https://storage.googleapis.com/cdn.fortifi.co/ https://maxcdn.bootstrapcdn.com/font-awesome/ https://www.google.com/ https://www.youtube.com/ https://ajax.googleapis.com/ https://www.gstatic.com https://maps.googleapis.com https://static.twilio.com/libs/ https://*.static.twilio.com/ https://www.google-analytics.com *.fortel.li *.fortel.fortifi.me 'unsafe-inline' https://fonts.googleapis.com; script-src 'self' data: *.fortifi.cloud *.fortifi.io *.fortifiio.xyz *.fortifi.xyz *.fortifi.me:* https://storage.googleapis.com/cdn.fortifi.co/ https://maxcdn.bootstrapcdn.com/font-awesome/ https://www.google.com/ https://www.youtube.com/ https://ajax.googleapis.com/ https://www.gstatic.com https://maps.googleapis.com https://static.twilio.com/libs/ https://*.static.twilio.com/ https://www.google-analytics.com *.fortel.li *.fortel.fortifi.me 'unsafe-inline' 'unsafe-eval'; font-src 'self' data: *.fortifi.cloud *.fortifi.io *.fortifiio.xyz *.fortifi.xyz *.fortifi.me:* https://storage.googleapis.com/cdn.fortifi.co/ https://maxcdn.bootstrapcdn.com/font-awesome/ https://www.google.com/ https://www.youtube.com/ https://ajax.googleapis.com/ https://www.gstatic.com https://maps.googleapis.com https://static.twilio.com/libs/ https://*.static.twilio.com/ https://www.google-analytics.com *.fortel.li *.fortel.fortifi.me https://fonts.gstatic.com; frame-ancestors *.fortifi.me:8090; connect-src 'self' data: *.fortifi.cloud *.fortifi.io *.fortifiio.xyz *.fortifi.xyz *.fortifi.me:* https://storage.googleapis.com/cdn.fortifi.co/ https://maxcdn.bootstrapcdn.com/font-awesome/ https://www.google.com/ https://www.youtube.com/ https://ajax.googleapis.com/ https://www.gstatic.com https://maps.googleapis.com https://static.twilio.com/libs/ https://*.static.twilio.com/ https://www.google-analytics.com *.fortel.li *.fortel.fortifi.me wss://screenshare.fortifiio.xyz https://screenshare.fortifiio.xyz ws://chat.fortifi.me:8443 wss://call.fortifi.xyz wss://call.fortifiio.xyz wss://*.twilio.com; media-src 'self' data: *.fortifi.cloud *.fortifi.io *.fortifiio.xyz *.fortifi.xyz *.fortifi.me:* https://storage.googleapis.com/cdn.fortifi.co/ https://maxcdn.bootstrapcdn.com/font-awesome/ https://www.google.com/ https://www.youtube.com/ https://ajax.googleapis.com/ https://www.gstatic.com https://maps.googleapis.com https://static.twilio.com/libs/ https://*.static.twilio.com/ https://www.google-analytics.com *.fortel.li *.fortel.fortifi.me blob: *.fortifi.cloud *.fortifi.xyz *.fortifiio.xyz *.fortifi.co *.fortifi.me:* https://storage.googleapis.com/fortifi-stage-attachments/ https://storage.googleapis.com/storage.fortifi.co/ https://api.twilio.com/");
+header("X-Content-Security-Policy: default-src 'self' data: *.fortifi.cloud *.fortifi.io *.fortifiio.xyz *.fortifi.xyz *.fortifi.me:* https://storage.googleapis.com/cdn.fortifi.co/ https://maxcdn.bootstrapcdn.com/font-awesome/ https://www.google.com/ https://www.youtube.com/ https://ajax.googleapis.com/ https://www.gstatic.com https://maps.googleapis.com https://static.twilio.com/libs/ https://*.static.twilio.com/ https://www.google-analytics.com *.fortel.li *.fortel.fortifi.me; style-src 'self' data: *.fortifi.cloud *.fortifi.io *.fortifiio.xyz *.fortifi.xyz *.fortifi.me:* https://storage.googleapis.com/cdn.fortifi.co/ https://maxcdn.bootstrapcdn.com/font-awesome/ https://www.google.com/ https://www.youtube.com/ https://ajax.googleapis.com/ https://www.gstatic.com https://maps.googleapis.com https://static.twilio.com/libs/ https://*.static.twilio.com/ https://www.google-analytics.com *.fortel.li *.fortel.fortifi.me 'unsafe-inline' https://fonts.googleapis.com; script-src 'self' data: *.fortifi.cloud *.fortifi.io *.fortifiio.xyz *.fortifi.xyz *.fortifi.me:* https://storage.googleapis.com/cdn.fortifi.co/ https://maxcdn.bootstrapcdn.com/font-awesome/ https://www.google.com/ https://www.youtube.com/ https://ajax.googleapis.com/ https://www.gstatic.com https://maps.googleapis.com https://static.twilio.com/libs/ https://*.static.twilio.com/ https://www.google-analytics.com *.fortel.li *.fortel.fortifi.me 'unsafe-inline' 'unsafe-eval'; font-src 'self' data: *.fortifi.cloud *.fortifi.io *.fortifiio.xyz *.fortifi.xyz *.fortifi.me:* https://storage.googleapis.com/cdn.fortifi.co/ https://maxcdn.bootstrapcdn.com/font-awesome/ https://www.google.com/ https://www.youtube.com/ https://ajax.googleapis.com/ https://www.gstatic.com https://maps.googleapis.com https://static.twilio.com/libs/ https://*.static.twilio.com/ https://www.google-analytics.com *.fortel.li *.fortel.fortifi.me https://fonts.gstatic.com; frame-ancestors *.fortifi.me:8090; connect-src 'self' data: *.fortifi.cloud *.fortifi.io *.fortifiio.xyz *.fortifi.xyz *.fortifi.me:* https://storage.googleapis.com/cdn.fortifi.co/ https://maxcdn.bootstrapcdn.com/font-awesome/ https://www.google.com/ https://www.youtube.com/ https://ajax.googleapis.com/ https://www.gstatic.com https://maps.googleapis.com https://static.twilio.com/libs/ https://*.static.twilio.com/ https://www.google-analytics.com *.fortel.li *.fortel.fortifi.me wss://screenshare.fortifiio.xyz https://screenshare.fortifiio.xyz ws://chat.fortifi.me:8443 wss://call.fortifi.xyz wss://call.fortifiio.xyz wss://*.twilio.com; media-src 'self' data: *.fortifi.cloud *.fortifi.io *.fortifiio.xyz *.fortifi.xyz *.fortifi.me:* https://storage.googleapis.com/cdn.fortifi.co/ https://maxcdn.bootstrapcdn.com/font-awesome/ https://www.google.com/ https://www.youtube.com/ https://ajax.googleapis.com/ https://www.gstatic.com https://maps.googleapis.com https://static.twilio.com/libs/ https://*.static.twilio.com/ https://www.google-analytics.com *.fortel.li *.fortel.fortifi.me blob: *.fortifi.cloud *.fortifi.xyz *.fortifiio.xyz *.fortifi.co *.fortifi.me:* https://storage.googleapis.com/fortifi-stage-attachments/ https://storage.googleapis.com/storage.fortifi.co/ https://api.twilio.com/");
+header("X-Frame-Options: SAMEORIGIN");
+header("Set-Cookie: e1d0dd2c6a_login=eyJpdiI6Ilhjb21JeVZDQnZWNUcyellWYVM5cWc9PSIsInZhbHVlIjoiUUVcL250NkNpQjRMOUlPdm9TXC9GTmhOcFwvdGtsSnhtZnNCdFNzVTF1U3dcL0UyXC9UdWc0aUJsUFZmVzZOT3Y3WkoydmZpUG5LamFEMDhGdzNSdlhcL2E2Sjd1NHZJMk5GdDZDeFRJMzdMN3FSS3VDWFwvTlg5QXdrbHVvSmtwRFdvaEp1NGJiaTA5blNza3ltdGp4SG1wR1w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UR5a0k1SWVCRG1GVW84K1IrSytOemNFUnRpU2g1bFZ5WVp4OXhpeEd3MXVcL2tSc1ZLbVwveTBqWEVlUm5QUldwU1c4REN0eHdLWWZJSGVLWTdLdGlsVnBFaVhJNmQrZmlnNnY4Mk1VZytHT3BWUEJkWnJjSVY2T2xSM1FzTTQ4cXd2c3Urd1pHTTNWdzhVbFFwa1pRdlhDbmM4Z1prXC8yVjFZMGZYYTBGMEMwK1MxNnZxUnRRa2ZVUjJDWk9RVEtJV3NqZ3VEdTdYU0pIMkhZR0loK2l2aG1qT256MEVoXC84TVwveHo2amhMYmExSzhYc25ONFpCQm1BbGN3b2hKWmlaWUtYR3ZQQ3g4Znl6OFJYNHNQTzY1ZXlkZzlsOHNJRnZZMVllVmt4OWZlalloQ3MyRmVRblFUM01qU2g1SXFSbTRcL0dLZFljU09sOXMyWE11elpvOFdcL3lcL0RRbzA2MnlsSk11c3FlN3Nzd2NPSnFYUUZzOTZGXC83cGxyK056NWJxbWZ3eXBcL3ZFbUtHVWp6VkE4VVpicW5TclZEXC9CVHljcStOUDhUSXcyeHdVXC94VEhIcGowTlFUV3pWZmxwbFE9PSIsIm1hYyI6IjE0NTI1NGRjMjM5MzMzMmE0MDBmZTI2YjkyNmQ2YWNkM2EzNzVhMGQ4NGM5MWQyNzZiZmU5ZmMzN2Y5OTZkNTYifQ%3D%3D; expires=Wed, 26-May-2021 09:34:04 GMT; Max-Age=155520000; path=/; domain=fortel.fortifi.me; HttpOnly");
+header("Location: /locked?return=/customers/40673510/billing/invoices&qs=currency%3DUSD%26customerId%3D40673510");
+?> \ No newline at end of file
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/printenv.cgi b/web/server/h2o/libh2o/t/assets/doc_root/printenv.cgi
new file mode 100755
index 000000000..efe9b74c0
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/printenv.cgi
@@ -0,0 +1,9 @@
+#! /bin/sh
+exec ${H2O_PERL:-perl} -x $0 "$@"
+#! perl
+
+print "content-type: text/plain; charset=utf-8\r\n\r\n";
+
+for my $k (sort keys %ENV) {
+ print "$k:$ENV{$k}\n";
+}
diff --git a/web/server/h2o/libh2o/t/assets/doc_root/subdir/index.txt b/web/server/h2o/libh2o/t/assets/doc_root/subdir/index.txt
new file mode 100644
index 000000000..1fa86464d
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/doc_root/subdir/index.txt
@@ -0,0 +1 @@
+subdir index
diff --git a/web/server/h2o/libh2o/t/assets/session_tickets.yaml b/web/server/h2o/libh2o/t/assets/session_tickets.yaml
new file mode 100644
index 000000000..f97285299
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/session_tickets.yaml
@@ -0,0 +1,12 @@
+- name: a397b6b7fab929366203f16fc81ffbed
+ cipher: aes-128-cbc
+ hash: sha1
+ key: f1ed89cde68763630e80d2be827cfb98e3fe72644f64315a4a8ad63769a3577ccec4dd13b20eaf8c008886e5458db10e658cf2a83f04403ac4e98035d2422a75806730eb4f2fee12faff954895bc65d1
+ not_before: 1437092430
+ not_after: 1437096029
+- name: e7e3c6980b1832bd5d23917572e8448f
+ cipher: aes-256-cbc
+ hash: sha256
+ key: f6e071d993b05f77ce51cb0fe2e0e18c7200c2a7873a66008c8e1d75ae7b8e2af4fcb86fdf03a7f335632e668a8fe956c5bfe77a41412d269979634768999add6a84cafea41b6b2c47aaf1a514ca9d2a84f48d1f5f7018ff1740cf9b944b8fcf
+ not_before: 1437093330
+ not_after: 1437096929
diff --git a/web/server/h2o/libh2o/t/assets/upstream.psgi b/web/server/h2o/libh2o/t/assets/upstream.psgi
new file mode 100644
index 000000000..95427428a
--- /dev/null
+++ b/web/server/h2o/libh2o/t/assets/upstream.psgi
@@ -0,0 +1,225 @@
+use strict;
+use warnings;
+use Digest::SHA qw(sha1_base64);
+use Plack::App::File;
+use Plack::Builder;
+use Plack::Request;
+use Plack::TempBuffer;
+use Time::HiRes qw(sleep);
+use t::Util;
+
+my $force_chunked = $ENV{FORCE_CHUNKED} || 0;
+
+builder {
+ enable sub {
+ my $app = shift;
+ return sub {
+ my $env = shift;
+ my $query = Plack::Request->new($env)->query_parameters;
+ my $res = $app->($env);
+ Plack::Util::response_cb($res, sub {
+ my $res = shift;
+ if ($query->{"resp:status"}) {
+ $res->[0] = $query->get("resp:status");
+ $query->remove("resp:status");
+ }
+ push @{$res->[1]}, map {
+ my $n = $_;
+ +(substr($n, length "resp:") => $query->get($n))
+ } grep {
+ $_ =~ /^resp:/
+ } $query->keys;
+ $res;
+ });
+ };
+ };
+ if ($force_chunked) {
+ enable sub {
+ my $app = shift;
+ return sub {
+ my $env = shift;
+ my $res = $app->($env);
+ Plack::Util::response_cb($res, sub {
+ my $res = shift;
+ my @headers;
+ for (my $i = 0; $i != @{$res->[1]}; $i += 2) {
+ push @headers, $res->[1][$i], $res->[1][$i + 1]
+ if lc $res->[1][$i] ne 'content-length';
+ }
+ $res->[1] = \@headers;
+ return $res;
+ });
+ };
+ };
+ }
+ mount "/" => Plack::App::File->new(root => DOC_ROOT)->to_app;
+ mount "/echo-query" => sub {
+ my $env = shift;
+ return [
+ 200,
+ [
+ 'content-type' => 'text/plain',
+ ],
+ [$env->{QUERY_STRING}],
+ ];
+ };
+ mount "/echo" => sub {
+ my $env = shift;
+ my $content = Plack::TempBuffer->new;
+ if ($env->{'psgi.input'}) {
+ my $buf;
+ while ($env->{'psgi.input'}->read($buf, 65536)) {
+ $content->print($buf);
+ }
+ }
+ return [
+ 200,
+ [
+ 'content-type' => 'text/plain',
+ 'content-length' => $content->size(),
+ ],
+ $content->rewind(),
+ ];
+ };
+ mount "/echo-headers" => sub {
+ my $env = shift;
+ return [
+ 200,
+ [
+ 'content-type' => 'text/plain',
+ ],
+ [
+ join "\n", map { my $n = lc $_; $n=~ s/^http_//; $n =~ tr/_/-/; "$n: $env->{$_}" } sort grep { /^(HTTP_|HTTPS$)/ } keys %$env,
+ ]
+ ];
+ };
+ mount "/echo-server-header" => sub {
+ my $env = shift;
+ my @resph = [ 'content-type' => 'text/plain' ];
+ if ($env->{HTTP_SERVER}) {
+ @resph = [ 'content-type' => 'text/plain', 'server' => $env->{HTTP_SERVER} ];
+ }
+ return [
+ 200, @resph, [ "Ok" ]
+ ];
+ };
+ mount "/streaming-body" => sub {
+ my $env = shift;
+ return sub {
+ my $responder = shift;
+ my $writer = $responder->([ 200, [ 'content-type' => 'text/plain' ] ]);
+ for my $i (1..30) {
+ sleep 0.1;
+ $writer->write($i);
+ }
+ $writer->close;
+ };
+ };
+ mount "/sleep-and-respond" => sub {
+ my $env = shift;
+ my $query = Plack::Request->new($env)->parameters;
+ sleep($query->{sleep} || 0);
+ return [
+ 200,
+ [
+ 'content-type' => 'text/plain; charset=utf-8',
+ ],
+ [
+ 'hello world',
+ ],
+ ];
+ };
+ mount "/fixed-date-header" => sub {
+ my $env = shift;
+ return [
+ 200,
+ [
+ 'content-type' => 'text/plain',
+ 'date' => 'Thu, 01 Jan 1970 00:00:00 GMT',
+ ],
+ []
+ ];
+ };
+ mount "/infinite-stream" => sub {
+ my $env = shift;
+ return sub {
+ my $responder = shift;
+ my $writer = $responder->([ 200, [ 'content-type' => 'text/plain' ] ]);
+ while ($writer->write("lorem ipsum dolor sit amet")) {
+ sleep 0.1;
+ }
+ $writer->close;
+ };
+ };
+ mount "/infinite-redirect" => sub {
+ my $env = shift;
+ return [
+ 302,
+ [
+ location => '/infinite-redirect',
+ ],
+ [],
+ ];
+ };
+ mount "/websocket" => sub {
+ my $env = shift;
+ my $key = $env->{HTTP_SEC_WEBSOCKET_KEY}
+ or return [400, [], ["no Sec-WebSocket-Key"]];
+ $key .= "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
+ my $accept_key = sha1_base64($key);
+ my $fh = $env->{"psgix.io"};
+ print $fh join(
+ "\r\n",
+ "HTTP/1.1 101 Switching Protocols",
+ "Upgrade: websocket",
+ "Sec-Websocket-Accept: $accept_key",
+ "",
+ "",
+ );
+ while (1) {
+ my $rfds = '';
+ vec($rfds, fileno($fh), 1) = 1;
+ next if select($rfds, undef, undef, undef) <= 0;
+ $fh->sysread(my $data, 65536) <= 0
+ and last;
+ while (length($data) != 0) {
+ my $wfds = '';
+ vec($wfds, fileno($fh), 1) = 1;
+ next if select(undef, $wfds, undef, undef) <= 0;
+ my $wlen = $fh->syswrite($data);
+ last if $wlen <= 0;
+ $data = substr $data, $wlen;
+ }
+ }
+ close $fh;
+ exit 0;
+ };
+ mount "/1xx-push" => sub {
+ my $env = shift;
+ my $fh = $env->{"psgix.io"};
+ print $fh join(
+ "\r\n",
+ "HTTP/1.1 100 Continue",
+ "link: </index.js>; rel=preload",
+ "",
+ "",
+ );
+ sleep 1.1;
+ [200, ["content-type" => "text/plain; charset=utf-8", "content-length" => 11], ["hello world"]];
+ };
+ mount "/push-attr" => sub {
+ my $env = shift;
+ my $query = Plack::Request->new($env)->query_parameters;
+ [200, ["content-type" => "text/plain; charset=utf-8", "content-length" => 11, "link" => "$query->{'pushes'}"], ["hello world"]];
+ };
+ mount "/no-content" => sub {
+ my $env = shift;
+ return [
+ 204,
+ [
+ 'content-type' => 'text/plain',
+ ],
+ [],
+ ];
+ };
+};