summaryrefslogtreecommitdiff
path: root/regress/usr.sbin/relayd/args-http-remove.pl
blob: e840563cfef44e36d5e79acbb29a472999a023ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use strict;
use warnings;

my %header = (
	"X-Header-Foo" => "foo",
	"X-Header-Bar" => "bar",
);
our %args = (
    client => {
	func => \&http_client,
	loggrep => {
	    "X-Header-Foo: foo" => 0,
	    "X-Header-Bar: bar" => 1,
	},
    },
    relayd => {
	protocol => [ "http",
	    'match response header remove X-Header-Foo',
	    'match response header log "*"',
	],
	loggrep => { qr/ (?:done|last write \(done\)), \[X-Header-Foo: foo \*removed\*\s*\]/ => 1 },
    },
    server => {
	func => \&http_server,
	header => \%header,
	loggrep => {
	    "X-Header-Foo: foo" => 1,
	    "X-Header-Bar: bar" => 1,
	},
    },
);

1;