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

our %args = (
    client => {
	func => sub {
	    my $self = shift;
	    print <<'EOF';
GET http://www.foo.com/1 HTTP/1.1

EOF
	    http_response($self, 1);
	},
	http_vers => ["1.1"],
	nocheck => 1,
	method => "GET",
    },
    relayd => {
	protocol => [ "http",
	    "match request header log Host",
	    "match request path log \"*\"",
	],
	loggrep => {
	    qr/, malformed header$/ => 0,
	    qr/\[http:\/\/www.foo.com\/1\] GET/ => 1,
	},
    },
    server => {
	func => \&http_server,
	nocheck => 1,
    }
);

1;