summaryrefslogtreecommitdiff
path: root/regress/usr.sbin/relayd/args-http-change.pl
blob: fb38379b5ad120e0be40024c444e856f82fbfb80 (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
use strict;
use warnings;

my %header = ("X-Test-Header" => "XOriginalValue");
our %args = (
    client => {
	func => \&http_client,
	loggrep => {
		qr/X-Test-Header: XChangedValue/ => 1,
		qr/Host: foo.bar/ => 1,
	}
    },
    relayd => {
	protocol => [ "http",
	    'match request header set "Host" value "foobar.changed"',
	    'match response header set "X-Test-Header" value "XChangedValue"',
	],
    },
    server => {
	func => \&http_server,
	header => \%header,
	loggrep => {
		qr/X-Test-Header: XOriginalValue/ => 1,
		qr/Host: foobar.changed/ => 1,
	},
    },
);

1;