diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2014-07-11 11:48:51 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2014-07-11 11:48:51 +0000 |
commit | 9f9d3e11dc3edea54588bafb93ba61aa46120ce0 (patch) | |
tree | d2ffe5b5e2219bb90d00f82c900f0bda84a11605 /regress | |
parent | e35abe3edb1e0cfd946863c23f00fc57fe24bce5 (diff) |
Simplify the code that handles the HTTP headers by using an RB tree
with associated lists instead of the complicated lookup table and
"others" list. This might add a little malloc overhead for common
headers but also fixes some issues like the handling of repeated
headers - for example, handling of multiple "Set-Cookie" headers.
ok bluhm@ (regress part)
ok benno@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.sbin/relayd/args-http-change-cookie.pl | 2 | ||||
-rw-r--r-- | regress/usr.sbin/relayd/args-http-change-path.pl | 2 | ||||
-rw-r--r-- | regress/usr.sbin/relayd/args-http-remove.pl | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/regress/usr.sbin/relayd/args-http-change-cookie.pl b/regress/usr.sbin/relayd/args-http-change-cookie.pl index ac0dd71c83f..c6808c98159 100644 --- a/regress/usr.sbin/relayd/args-http-change-cookie.pl +++ b/regress/usr.sbin/relayd/args-http-change-cookie.pl @@ -1,7 +1,7 @@ use strict; use warnings; -my $name = "X-Set-Cookie"; +my $name = "Set-Cookie"; my %header = ("$name" => [ "test=a;", "test=b;" ]); our %args = ( client => { diff --git a/regress/usr.sbin/relayd/args-http-change-path.pl b/regress/usr.sbin/relayd/args-http-change-path.pl index 41a547d672b..c4070b2a76b 100644 --- a/regress/usr.sbin/relayd/args-http-change-path.pl +++ b/regress/usr.sbin/relayd/args-http-change-path.pl @@ -13,7 +13,7 @@ our %args = ( 'match request path set "*" value "/foopath" \ url log "*"', ], - loggrep => { qr/\, done\, \[foo.bar\/foopath\]/ => 1 }, + loggrep => { qr/ (?:done|last write \(done\)), \[foo.bar\/foopath\]/ => 1 }, }, server => { func => \&http_server, diff --git a/regress/usr.sbin/relayd/args-http-remove.pl b/regress/usr.sbin/relayd/args-http-remove.pl index 6cc061d177a..45800210b6c 100644 --- a/regress/usr.sbin/relayd/args-http-remove.pl +++ b/regress/usr.sbin/relayd/args-http-remove.pl @@ -16,7 +16,7 @@ our %args = ( relayd => { protocol => [ "http", 'match response header remove X-Header-Foo', - 'match response header log "*"', + 'match response header log "*Foo"', ], loggrep => { qr/ (?:done|last write \(done\)), \[X-Header-Foo: foo \(removed\)\s*\]/ => 1 }, }, |