[MEDIUM] allow a TCP frontend to switch to an HTTP backend

This patch allows a TCP frontend to switch to an HTTP backend.
During the switch, missing structures are automatically allocated.
The HTTP parser is enabled so that the backend first waits for a
full HTTP request.
diff --git a/src/proto_http.c b/src/proto_http.c
index be31c48..229d71f 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -1832,6 +1832,12 @@
 	struct redirect_rule *rule;
 	int cur_idx;
 
+	if (unlikely(msg->msg_state != HTTP_MSG_BODY)) {
+		/* we need more data */
+		buffer_write_dis(req);
+		return 0;
+	}
+
 	req->analysers &= ~an_bit;
 	req->analyse_exp = TICK_ETERNITY;
 
@@ -2092,6 +2098,12 @@
 	struct http_txn *txn = &s->txn;
 	struct http_msg *msg = &txn->req;
 
+	if (unlikely(msg->msg_state != HTTP_MSG_BODY)) {
+		/* we need more data */
+		buffer_write_dis(req);
+		return 0;
+	}
+
 	req->analysers &= ~an_bit;
 	req->analyse_exp = TICK_ETERNITY;
 
@@ -2450,6 +2462,12 @@
 	long long limit = s->be->url_param_post_limit;
 	struct hdr_ctx ctx;
 
+	if (unlikely(msg->msg_state != HTTP_MSG_BODY)) {
+		/* we need more data */
+		buffer_write_dis(req);
+		return 0;
+	}
+
 	/* We have to parse the HTTP request body to find any required data.
 	 * "balance url_param check_post" should have been the only way to get
 	 * into this. We were brought here after HTTP header analysis, so all