]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MEDIUM] session: call the frontend_decode_proxy analyser on proxied connections
authorWilly Tarreau <w@1wt.eu>
Fri, 15 Oct 2010 21:25:20 +0000 (23:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Oct 2010 17:04:38 +0000 (19:04 +0200)
This analyser must absolutely be the earliest one to process contents, given
the nature of the protocol.

src/session.c

index dd130e0258910a2d4fb74e594105ec245d39a3bb..9f3ccec0579fea59e9bd82e92ae1bb41c4f882ed 100644 (file)
@@ -27,6 +27,7 @@
 #include <proto/checks.h>
 #include <proto/dumpstats.h>
 #include <proto/freq_ctr.h>
+#include <proto/frontend.h>
 #include <proto/hdr_idx.h>
 #include <proto/log.h>
 #include <proto/session.h>
@@ -1435,6 +1436,12 @@ struct task *process_session(struct task *t)
                        while (ana_list && max_loops--) {
                                /* Warning! ensure that analysers are always placed in ascending order! */
 
+                               if (ana_list & AN_REQ_DECODE_PROXY) {
+                                       if (!frontend_decode_proxy_request(s, s->req, AN_REQ_DECODE_PROXY))
+                                               break;
+                                       UPDATE_ANALYSERS(s->req->analysers, ana_list, ana_back, AN_REQ_DECODE_PROXY);
+                               }
+
                                if (ana_list & AN_REQ_INSPECT_FE) {
                                        if (!tcp_inspect_request(s, s->req, AN_REQ_INSPECT_FE))
                                                break;