summaryrefslogtreecommitdiffstats
path: root/web/server/h2o/libh2o/t/40server-push-multiple.t
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 12:08:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 12:08:18 +0000
commit5da14042f70711ea5cf66e034699730335462f66 (patch)
tree0f6354ccac934ed87a2d555f45be4c831cf92f4a /web/server/h2o/libh2o/t/40server-push-multiple.t
parentReleasing debian version 1.44.3-2. (diff)
downloadnetdata-5da14042f70711ea5cf66e034699730335462f66.tar.xz
netdata-5da14042f70711ea5cf66e034699730335462f66.zip
Merging upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/server/h2o/libh2o/t/40server-push-multiple.t')
-rw-r--r--web/server/h2o/libh2o/t/40server-push-multiple.t66
1 files changed, 0 insertions, 66 deletions
diff --git a/web/server/h2o/libh2o/t/40server-push-multiple.t b/web/server/h2o/libh2o/t/40server-push-multiple.t
deleted file mode 100644
index b43c9675f..000000000
--- a/web/server/h2o/libh2o/t/40server-push-multiple.t
+++ /dev/null
@@ -1,66 +0,0 @@
-use strict;
-use warnings;
-use Net::EmptyPort qw(check_port empty_port);
-use Test::More;
-use t::Util;
-
-plan skip_all => 'plackup not found'
- unless prog_exists('plackup');
-plan skip_all => 'Starlet not found'
- unless system('perl -MStarlet /dev/null > /dev/null 2>&1') == 0;
-plan skip_all => 'nghttp not found'
- unless prog_exists('nghttp');
-plan skip_all => 'mruby support is off'
- unless server_features()->{mruby};
-
-subtest "basic" => sub {
- # spawn upstream
- my $upstream_port = empty_port();
- my $upstream = spawn_server(
- argv => [
- qw(plackup -s Starlet --access-log /dev/null -p), $upstream_port, ASSETS_DIR . "/upstream.psgi",
- ],
- is_ready => sub {
- check_port($upstream_port);
- },
- );
- # spawn server
- my $server = spawn_h2o(<< "EOT");
-hosts:
- default:
- paths:
- /:
- proxy.reverse.url: http://127.0.0.1:$upstream_port
- /mruby:
- mruby.handler: |
- Proc.new do |env|
- [399, { "link" => "</index.txt.gz>; rel=preload, </index.txt.gz?1>; rel=preload, </index.txt.gz?nopush>; rel=preload; nopush" }, [] ]
- end
- proxy.reverse.url: http://127.0.0.1:$upstream_port
- /assets:
- file.dir: @{[DOC_ROOT]}
-EOT
-
- my $doit = sub {
- my ($proto, $opts, $port) = @_;
- subtest 'push-prioritized' => sub {
- my $resp = `nghttp $opts -n --stat '$proto://127.0.0.1:$port/mruby'`;
- like $resp, qr{\nid\s*responseEnd\s.*\s/index\.txt\.gz}is, "index.txt.gz is pushed";
- like $resp, qr{\nid\s*responseEnd\s.*\s/index\.txt\.gz\?1}is, "index.txt.gz?1 is pushed";
- unlike $resp, qr{\nid\s*responseEnd\s.*\s/index\.txt\.gz\?nopush}is, "index.txt.gz?nopush isn't pushed";
- };
- };
-
- subtest 'h2 direct' => sub {
- $doit->('http', '', $server->{port});
- };
- subtest 'h2 upgrade' => sub {
- $doit->('http', '-u', $server->{port});
- };
- subtest 'h2c' => sub {
- $doit->('https', '', $server->{tls_port});
- };
-};
-
-
-done_testing;