From: benno Date: Fri, 22 Jul 2016 09:32:26 +0000 (+0000) Subject: add a regression test X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d3bb36eae1f6eed6d696fdb46382b74430a72f74;p=openbsd add a regression test --- 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;