From d281d68d3aa010f7e1a635c92ab486f7f2c666b9 Mon Sep 17 00:00:00 2001 From: Thierry Fournier Date: Wed, 1 Jun 2016 13:36:20 +0200 Subject: [PATCH 13/14] BUG/MINOR: http: add-header: header name copied twice The header name is copied two time in the buffer. The first copy is a printf-like function writing the name and the http separators in the buffer, and the second form is a memcopy. This seems to be inherited from some changes. This patch removes the printf like, format. This patch must be backported in 1.6 and 1.5 versions (cherry picked from commit 53c1a9b7cb8f3fe79b5492218363b6c0ff608fc1) --- src/proto_http.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/proto_http.c b/src/proto_http.c index 6eac62b..0d9dd31 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -3615,7 +3615,6 @@ resume_execution: case ACT_HTTP_SET_HDR: case ACT_HTTP_ADD_HDR: - chunk_printf(&trash, "%s: ", rule->arg.hdr_add.name); memcpy(trash.str, rule->arg.hdr_add.name, rule->arg.hdr_add.name_len); trash.len = rule->arg.hdr_add.name_len; trash.str[trash.len++] = ':'; -- 2.6.6