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
This commit is contained in:
Thierry Fournier 2016-06-01 13:36:20 +02:00 committed by Willy Tarreau
parent 4a53bfdc1d
commit 53c1a9b7cb

View 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++] = ':';