]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stats: last fix was still wrong
authorWilly Tarreau <w@1wt.eu>
Tue, 25 Dec 2012 20:53:25 +0000 (21:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 25 Dec 2012 20:55:37 +0000 (21:55 +0100)
Previous commit was still wrong, it broke add-header and set-header
because we don't want to leave on these actions.

The http_check_access_rule() function should be redesigned, it was
initially thought for allow/deny rules but now it is executing other
non-final rules and at the same time returning a pointer to the last
final rule. That becomes a bit confusing and will need to be addressed
before we implement redirect and return.

src/proto_http.c

index deed52ec04d8c8b55706af9132567be2855cf6ff..535c159495ca913041316a98ad0ef80c23dcc555 100644 (file)
@@ -3113,7 +3113,7 @@ http_check_access_rule(struct proxy *px, struct list *rules, struct session *s,
                                trash.str[trash.len++] = ' ';
                                trash.len += build_logline(s, trash.str + trash.len, trash.size - trash.len, &rule->arg.hdr_add.fmt);
                                http_header_add_tail2(&txn->req, &txn->hdr_idx, trash.str, trash.len);
-                               return rule;
+                               break;
                        }
                }
        }