]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] fix reqadd when no option httpclose is used.
authorWilly Tarreau <w@1wt.eu>
Fri, 30 Mar 2007 10:02:43 +0000 (12:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 30 Mar 2007 10:02:43 +0000 (12:02 +0200)
Due to a code indentation mismatch, the rspadd headers were only
added if option httpclose was not set.

src/proto_http.c

index 6728eb3493f358938c0fcdae643cca6d78adc905..cbd6c436c9ade4fdafd371a52539fb76eaf76604 100644 (file)
@@ -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 */