diff --git a/src/proto_http.c b/src/proto_http.c index af53dda70..52efdf806 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -3956,13 +3956,13 @@ int http_send_name_header(struct http_txn *txn, struct http_msg *msg, struct buf struct hdr_ctx ctx; - ctx.idx = 0; - char *hdr_name = be->server_id_hdr_name; int hdr_name_len = be->server_id_hdr_len; char *hdr_val; + ctx.idx = 0; + while (http_find_header2(hdr_name, hdr_name_len, msg->sol, &txn->hdr_idx, &ctx)) { /* remove any existing values from the header */ http_remove_header2(msg, buf, &txn->hdr_idx, &ctx);