summaryrefslogtreecommitdiffstats
path: root/debian/vendor-h2o/t/50reverse-proxy-drop-headers.t
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:50:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:50:01 +0000
commit91275eb478ceb58083426099b6da3f4c7e189f19 (patch)
tree260f7d2fa77408b38c5cea96b320b9b0b6713ff2 /debian/vendor-h2o/t/50reverse-proxy-drop-headers.t
parentMerging upstream version 1.9.4. (diff)
downloaddnsdist-91275eb478ceb58083426099b6da3f4c7e189f19.tar.xz
dnsdist-91275eb478ceb58083426099b6da3f4c7e189f19.zip
Merging debian version 1.9.4-1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/vendor-h2o/t/50reverse-proxy-drop-headers.t')
-rw-r--r--debian/vendor-h2o/t/50reverse-proxy-drop-headers.t57
1 files changed, 0 insertions, 57 deletions
diff --git a/debian/vendor-h2o/t/50reverse-proxy-drop-headers.t b/debian/vendor-h2o/t/50reverse-proxy-drop-headers.t
deleted file mode 100644
index 0ae1e61..0000000
--- a/debian/vendor-h2o/t/50reverse-proxy-drop-headers.t
+++ /dev/null
@@ -1,57 +0,0 @@
-use strict;
-use warnings;
-use Net::EmptyPort qw(check_port empty_port);
-use Test::More;
-use t::Util;
-
-plan skip_all => 'curl not found'
- unless prog_exists('curl');
-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;
-
-my $upstream_port = empty_port();
-
-my $guard = spawn_server(
- argv => [ qw(plackup -s Starlet --keepalive-timeout 100 --access-log /dev/null --listen), "127.0.0.1:$upstream_port", ASSETS_DIR . "/upstream.psgi" ],
- is_ready => sub {
- check_port($upstream_port);
- },
-);
-
-subtest 'request-header' => sub {
-# proxy-authenticate
-
- my $server = spawn_h2o(<< "EOT");
-hosts:
- default:
- paths:
- /:
- proxy.reverse.url: http://127.0.0.1.XIP.IO:$upstream_port
-EOT
-
- my $curl = 'curl --silent --dump-header /dev/stderr';
- my ($headers, $body) = run_prog("$curl"
- . " -H 'Proxy-Authenticate: hoge'"
- . " -H 'Date: Thu, 01 Jan 1970 00:00:00 GMT'"
- . " http://127.0.0.1:@{[$server->{port}]}/echo-headers");
- unlike $body, qr/^proxy-authenticate:/mi, 'proxy-authenticate header should be dropped';
- like $body, qr/^date:/mi, 'date request header is not dropped';
-};
-
-subtest 'response header' => sub {
- my $server = spawn_h2o(<< "EOT");
-hosts:
- default:
- paths:
- /:
- proxy.reverse.url: http://127.0.0.1.XIP.IO:$upstream_port
-EOT
-
- my $curl = 'curl --silent --dump-header /dev/stderr';
- my ($headers, $body) = run_prog("$curl http://127.0.0.1:@{[$server->{port}]}/fixed-date-header");
- unlike $headers, qr/Thu, 01 Jan 1970 00:00:00 GMT/, "date response header from upstream should be dropped and replaced";
-};
-
-done_testing();