summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2014-07-12 00:34:03 +0000
committerreyk <reyk@openbsd.org>2014-07-12 00:34:03 +0000
commitcd1721d3a6600737df5dc62c1db87d56e1c2a89b (patch)
tree47d99325f0190cf5e55febea7160fd8948913339
parentsync (diff)
downloadwireguard-openbsd-cd1721d3a6600737df5dc62c1db87d56e1c2a89b.tar.xz
wireguard-openbsd-cd1721d3a6600737df5dc62c1db87d56e1c2a89b.zip
Test filtering by method
ok bluhm@ benno@
-rw-r--r--regress/usr.sbin/relayd/args-http-filter-method.pl27
1 files changed, 27 insertions, 0 deletions
diff --git a/regress/usr.sbin/relayd/args-http-filter-method.pl b/regress/usr.sbin/relayd/args-http-filter-method.pl
new file mode 100644
index 00000000000..e646178c149
--- /dev/null
+++ b/regress/usr.sbin/relayd/args-http-filter-method.pl
@@ -0,0 +1,27 @@
+# test method filtering
+
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => \&http_client,
+ method => 'HEAD',
+ loggrep => qr/HTTP\/1\.0 403 Forbidden/,
+ httpnok => 1,
+ nocheck => 1,
+ },
+ relayd => {
+ protocol => [ "http",
+ 'return error',
+ 'block request method "HEAD" path log',
+ ],
+ loggrep => qr/403 Forbidden/,
+ },
+ server => {
+ noserver => 1,
+ nocheck => 1,
+ },
+);
+
+1;