diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2014-07-11 22:28:46 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2014-07-11 22:28:46 +0000 |
commit | 536f98dfa5333adb90b8c78ca020d7f070702965 (patch) | |
tree | e61db580bfe0a5c0f4c9fccbffa04073717ed0be /regress/usr.sbin/relayd | |
parent | e135a1a144961c66ddc491f160b768094f3ee23e (diff) |
Limit HTTP header length to about 8K (based on the default of 4-8K in
common web servers). Add a related regress test.
OK benno@
Diffstat (limited to 'regress/usr.sbin/relayd')
-rw-r--r-- | regress/usr.sbin/relayd/args-http-headerlength.pl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/regress/usr.sbin/relayd/args-http-headerlength.pl b/regress/usr.sbin/relayd/args-http-headerlength.pl new file mode 100644 index 00000000000..00b40952038 --- /dev/null +++ b/regress/usr.sbin/relayd/args-http-headerlength.pl @@ -0,0 +1,26 @@ +use strict; +use warnings; + +my %header = ( "Host" => "www.example.com", "Set-Cookie" => "a="."X"x8192 ); +our %args = ( + client => { + func => \&http_client, + header => \%header, + httpnok => 1, + nocheck => 1, + loggrep => qr/HTTP\/1\.0 413 Request Entity Too Large/, + }, + relayd => { + protocol => [ "http", + 'return error', + 'pass', + ], + loggrep => qr/413 Request Entity Too Large/, + }, + server => { + noserver => 1, + nocheck => 1, + }, +); + +1; |