1# Test that relayd aborts the connection if a header include a NUL byte
2
3use strict;
4use warnings;
5
6our %args = (
7    client => {
8	func => sub {
9	    my $self = shift;
10	    print <<"EOF";
11GET /1 HTTP/1.1
12Host: www.foo.com
13X-Header-Client: ABC\0D
14
15EOF
16	    # no http_response($self, 1);
17	},
18	http_vers => ["1.1"],
19	nocheck => 1,
20	method => "GET",
21    },
22    relayd => {
23	protocol => [ "http",
24	    "match request header log Host",
25	],
26	loggrep => {
27	    qr/, malformed$/ => 1,
28	    qr/\[Host: www.foo.com\] GET/ => 0,
29	},
30    },
31    server => {
32	func => \&http_server,
33	nocheck => 1,
34	noserver => 1,
35    }
36);
37
381;
39