From f2f0ee81ad9e58e7478317d43499e62be53a7b23 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 30 Mar 2007 12:02:43 +0200 Subject: [PATCH] [BUG] fix reqadd when no option httpclose is used. Due to a code indentation mismatch, the rspadd headers were only added if option httpclose was not set. --- src/proto_http.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/proto_http.c b/src/proto_http.c index 6728eb349..cbd6c436c 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -1573,15 +1573,14 @@ int process_cli(struct session *t) } old_idx = cur_idx; } - - /* add request headers from the rule sets in the same order */ - for (cur_idx = 0; cur_idx < rule_set->nb_reqadd; cur_idx++) { - if (unlikely(http_header_add_tail(req, - &txn->req, - &txn->hdr_idx, - rule_set->req_add[cur_idx])) < 0) - goto return_bad_req; - } + } + /* add request headers from the rule sets in the same order */ + for (cur_idx = 0; cur_idx < rule_set->nb_reqadd; cur_idx++) { + if (unlikely(http_header_add_tail(req, + &txn->req, + &txn->hdr_idx, + rule_set->req_add[cur_idx])) < 0) + goto return_bad_req; } /* check if stats URI was requested, and if an auth is needed */