From: Willy Tarreau Date: Fri, 30 Mar 2007 10:02:43 +0000 (+0200) Subject: [BUG] fix reqadd when no option httpclose is used. X-Git-Tag: v1.3.8.1~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f2f0ee81ad9e58e7478317d43499e62be53a7b23;p=thirdparty%2Fhaproxy.git [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. --- diff --git a/src/proto_http.c b/src/proto_http.c index 6728eb3493..cbd6c436c9 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 */