[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 6728eb3..cbd6c43 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -1573,15 +1573,14 @@
}
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 */