From 6a6bdf51d050bd64e21dc788bf739acda349e1be Mon Sep 17 00:00:00 2001
From: Sebastian Benoit <benno@cvs.openbsd.org>
Date: Sat, 12 Jul 2014 15:47:19 +0000
Subject: fix relay "append header" action, add regression test for append ok
 reyk

---
 usr.sbin/relayd/relay_http.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

(limited to 'usr.sbin/relayd')

diff --git a/usr.sbin/relayd/relay_http.c b/usr.sbin/relayd/relay_http.c
index 4928fcf445e..9e30487d525 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.26 2014/07/12 14:34:13 reyk Exp $	*/
+/*	$OpenBSD: relay_http.c,v 1.27 2014/07/12 15:47:18 benno Exp $	*/
 
 /*
  * Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -1437,11 +1437,8 @@ relay_apply_actions(struct ctl_relay_event *cre, struct kvlist *actions)
 					if (kv_set(match, "%s",
 					    kv->kv_value) == -1)
 						goto fail;
-				} else {
-					if (kv_setkey(match, "%s,%s",
-					    match->kv_key, kv->kv_key) == -1)
-						goto fail;
-				}
+				} else
+					addkv = 1;
 				break;
 			default:
 				/* query, url not supported */
-- 
cgit v1.2.3