From d3bb36eae1f6eed6d696fdb46382b74430a72f74 Mon Sep 17 00:00:00 2001 From: benno Date: Fri, 22 Jul 2016 09:32:26 +0000 Subject: [PATCH] add a regression test --- .../relayd/args-http-filter-null-host.pl | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 regress/usr.sbin/relayd/args-http-filter-null-host.pl diff --git a/regress/usr.sbin/relayd/args-http-filter-null-host.pl b/regress/usr.sbin/relayd/args-http-filter-null-host.pl new file mode 100644 index 00000000000..2ce8f63a329 --- /dev/null +++ b/regress/usr.sbin/relayd/args-http-filter-null-host.pl @@ -0,0 +1,33 @@ +# test http request with null Host header + +use strict; +use warnings; + + +my %header_client = ( + "Host" => "", +); + +our %args = ( + client => { + func => \&http_client, + header => \%header_client, + httpnok => 1, + nocheck => 1, + }, + relayd => { + protocol => [ "http", + 'pass', + 'block url "Host"', + 'return error', + ], +# loggrep => qr/Forbidden, \[Cookie: med=thx.*/, + }, + server => { + func => \&http_server, + noserver => 1, + nocheck => 1, + }, +); + +1; -- 2.20.1