]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] option forwardfor is for frontends too
authorWilly Tarreau <w@1wt.eu>
Sat, 3 Mar 2007 18:17:03 +0000 (19:17 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 3 Mar 2007 19:54:01 +0000 (20:54 +0100)
Finally, if the "option forwardfor" is specified in the frontend
and not in the backend, apply it.

TODO
src/proto_http.c

diff --git a/TODO b/TODO
index d6b5740720c49231a664020a2fd10e4c0436b53e..ae120a1e8c5a799c53e9f8d1a22f1ce7d5f1546d 100644 (file)
--- a/TODO
+++ b/TODO
@@ -174,4 +174,11 @@ TODO for 1.3
     filters and backend, on which every entity could rely.
   - implement 'on uri <uri> <proxy>', 'on host <host> <proxy>'
   - remove the first now useless hop in hdr_idx
+  - implement "track XXX.YYY" for each server as an alternative to
+    health checks. This will automatically set the server state to
+    the same as server YYY of proxy XXX.
+  - balance on URI hash (specify length or depth)
+  - balance on any header hash (eg: host)
+  - balance with redirections to real servers
+  - multi-site LB with weighted redirections to the remote one
 
index a7e51d534ef364ba035b2ec37fa65fe8d449f186..289ece6c22d61ccfabd42cf400bf9b6c1bc85297 100644 (file)
@@ -1133,16 +1133,6 @@ int process_cli(struct session *t)
                 *
                 * For the parsing, we use a 28 states FSM.
                 *
-                * RFC2616 requires that both LF and CRLF are recognized as
-                * line breaks, but that any other combination is an error.
-                * To avoid duplicating all the states above to check for CR,
-                * we use a special bit HTTP_PA_LF_EXP that we 'OR' with the
-                * state we will switch to if the LF is seen, so that we know
-                * whether there's a pending CR or not. We can check it
-                * globally since all CR followed by anything but LF are
-                * errors. Each state is entered with the first character is
-                * has to process at req->lr.
-                *
                 * Here is the information we currently have :
                 *   req->data + req->som  = beginning of request
                 *   req->data + req->eoh  = end of processed headers / start of current one
@@ -1570,9 +1560,10 @@ int process_cli(struct session *t)
 
 
                /*
-                * 9: add X-Forwarded-For : Should depend on the backend only.
+                * 9: add X-Forwarded-For if either the frontend or the backend
+                * asks for it.
                 */
-               if (t->be->beprm->options & PR_O_FWDFOR) {
+               if ((t->fe->options | t->be->beprm->options) & PR_O_FWDFOR) {
                        if (t->cli_addr.ss_family == AF_INET) {
                                int len;
                                unsigned char *pn;