]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http: add-header: header name copied twice
authorThierry Fournier <thierry.fournier@ozon.io>
Wed, 1 Jun 2016 11:36:20 +0000 (13:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 8 Jun 2016 08:34:07 +0000 (10:34 +0200)
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

src/proto_http.c

index 668663179cf23c8ffcb7742880038857cccea52d..d32acb0e1f5e2051356d56d861740b5f91658b41 100644 (file)
@@ -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++] = ':';