From 30a9b49f03e72d3730f3c2413195319242fbb8ec Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Thu, 10 Jul 2014 20:02:33 +0000 Subject: Print "%s (removed)" into relayd log and test for that string. suggested by reyk@ --- regress/usr.sbin/relayd/args-http-remove.pl | 2 +- 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 @@ -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; } -- cgit v1.2.3