diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2014-07-10 20:02:33 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2014-07-10 20:02:33 +0000 |
commit | 30a9b49f03e72d3730f3c2413195319242fbb8ec (patch) | |
tree | 70695ae8756f552a32ef8966b3b3abe3611cfa2c | |
parent | e624f9062b0d5c31d3b15d3b21b9dae04cdfad32 (diff) |
Print "%s (removed)" into relayd log and test for that string.
suggested by reyk@
-rw-r--r-- | regress/usr.sbin/relayd/args-http-remove.pl | 2 | ||||
-rw-r--r-- | usr.sbin/relayd/relay_http.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/regress/usr.sbin/relayd/args-http-remove.pl b/regress/usr.sbin/relayd/args-http-remove.pl index e840563cfef..6cc061d177a 100644 --- a/regress/usr.sbin/relayd/args-http-remove.pl +++ b/regress/usr.sbin/relayd/args-http-remove.pl @@ -18,7 +18,7 @@ our %args = ( 'match response header remove X-Header-Foo', 'match response header log "*"', ], - loggrep => { qr/ (?:done|last write \(done\)), \[X-Header-Foo: foo \*removed\*\s*\]/ => 1 }, + loggrep => { qr/ (?:done|last write \(done\)), \[X-Header-Foo: foo \(removed\)\s*\]/ => 1 }, }, server => { func => \&http_server, diff --git a/usr.sbin/relayd/relay_http.c b/usr.sbin/relayd/relay_http.c index facf0f93a07..f4d235162f7 100644 --- a/usr.sbin/relayd/relay_http.c +++ b/usr.sbin/relayd/relay_http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay_http.c,v 1.21 2014/07/10 00:05:59 reyk Exp $ */ +/* $OpenBSD: relay_http.c,v 1.22 2014/07/10 20:02:32 bluhm Exp $ */ /* * Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -1563,7 +1563,7 @@ relay_apply_actions(struct ctl_relay_event *cre, struct kvlist *actions) if (kv_inherit(mp, match) == NULL) goto fail; if (mp->kv_flags & KV_FLAG_INVALID) { - if (kv_set(mp, "%s*removed*", + if (kv_set(mp, "%s (removed)", mp->kv_value) == -1) goto fail; } |