From: Thierry Fournier Date: Wed, 1 Jun 2016 11:36:20 +0000 (+0200) Subject: BUG/MINOR: http: add-header: header name copied twice X-Git-Tag: v1.7-dev4~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=53c1a9b7cb8f3fe79b5492218363b6c0ff608fc1;p=thirdparty%2Fhaproxy.git 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 --- diff --git a/src/proto_http.c b/src/proto_http.c index 668663179c..d32acb0e1f 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -3401,7 +3401,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++] = ':';