[MAJOR] http: complete splitting of the remaining stages
The HTTP processing has been splitted into 7 steps, one of which
is not anymore HTTP-specific (content-switching). That way, it
becomes possible to use "use_backend" rules in TCP mode. A new
"use_server" directive should follow soon.
diff --git a/include/proto/proto_http.h b/include/proto/proto_http.h
index d70603c..35a216c 100644
--- a/include/proto/proto_http.h
+++ b/include/proto/proto_http.h
@@ -62,6 +62,7 @@
int process_srv_data(struct session *t);
int process_srv_conn(struct session *t);
int http_wait_for_request(struct session *s, struct buffer *req, int an_bit);
+int http_process_req_common(struct session *s, struct buffer *req, int an_bit, struct proxy *px);
int http_process_request(struct session *t, struct buffer *req, int an_bit);
int http_process_tarpit(struct session *s, struct buffer *req, int an_bit);
int http_process_request_body(struct session *s, struct buffer *req, int an_bit);
diff --git a/include/proto/proxy.h b/include/proto/proxy.h
index 8a2789d..36360e5 100644
--- a/include/proto/proxy.h
+++ b/include/proto/proxy.h
@@ -35,6 +35,7 @@
void stop_proxy(struct proxy *p);
void pause_proxies(void);
void listen_proxies(void);
+void session_set_backend(struct session *s, struct proxy *be);
const char *proxy_cap_str(int cap);
const char *proxy_mode_str(int mode);
diff --git a/include/types/buffers.h b/include/types/buffers.h
index a895477..234020f 100644
--- a/include/types/buffers.h
+++ b/include/types/buffers.h
@@ -106,12 +106,16 @@
* afterwards.
*/
#define AN_REQ_INSPECT 0x00000001 /* inspect request contents */
-#define AN_REQ_HTTP_HDR 0x00000002 /* inspect HTTP request headers */
-#define AN_REQ_HTTP_BODY 0x00000004 /* inspect HTTP request body */
-#define AN_REQ_HTTP_TARPIT 0x00000008 /* wait for end of HTTP tarpit */
-#define AN_RTR_HTTP_HDR 0x00000010 /* inspect HTTP response headers */
-#define AN_REQ_UNIX_STATS 0x00000020 /* process unix stats socket request */
-#define AN_REQ_WAIT_HTTP 0x00000040 /* wait for an HTTP request */
+#define AN_REQ_WAIT_HTTP 0x00000002 /* wait for an HTTP request */
+#define AN_REQ_HTTP_PROCESS_FE 0x00000004 /* process the frontend's HTTP part */
+#define AN_REQ_SWITCHING_RULES 0x00000008 /* apply the switching rules */
+#define AN_REQ_HTTP_PROCESS_BE 0x00000010 /* process the backend's HTTP part */
+#define AN_REQ_HTTP_INNER 0x00000020 /* inner processing of HTTP request */
+#define AN_REQ_HTTP_TARPIT 0x00000040 /* wait for end of HTTP tarpit */
+#define AN_REQ_HTTP_BODY 0x00000080 /* inspect HTTP request body */
+#define AN_REQ_UNIX_STATS 0x00000100 /* process unix stats socket request */
+
+#define AN_RTR_HTTP_HDR 0x00000200 /* inspect HTTP response headers */
/* describes a chunk of string */
struct chunk {