[MINOR] acl: add HTTP protocol detection (req_proto_http)

Now that we can perform TCP-based content switching, it makes sense
to be able to detect HTTP traffic and act accordingly. We already
have an HTTP decoder, we just have to call it in order to detect HTTP
protocol. Note that since the decoder will automatically fill in the
interesting fields of the HTTP transaction, it would make sense to
use this parsing to extend HTTP matching to TCP.
diff --git a/src/client.c b/src/client.c
index cfd41e0..6210cdb 100644
--- a/src/client.c
+++ b/src/client.c
@@ -252,21 +252,23 @@
 		txn->hdr_idx.v = NULL;
 		txn->hdr_idx.size = txn->hdr_idx.used = 0;
 
-		if (p->mode == PR_MODE_HTTP) {
-			txn->status = -1;
-			txn->req.hdr_content_len = 0LL;
-			txn->rsp.hdr_content_len = 0LL;
-			txn->req.msg_state = HTTP_MSG_RQBEFORE; /* at the very beginning of the request */
-			txn->rsp.msg_state = HTTP_MSG_RPBEFORE; /* at the very beginning of the response */
-			txn->req.sol = txn->req.eol = NULL;
-			txn->req.som = txn->req.eoh = 0; /* relative to the buffer */
-			txn->rsp.sol = txn->rsp.eol = NULL;
-			txn->rsp.som = txn->rsp.eoh = 0; /* relative to the buffer */
-			txn->req.err_pos = txn->rsp.err_pos = -2; /* block buggy requests/responses */
-			if (p->options2 & PR_O2_REQBUG_OK)
-				txn->req.err_pos = -1; /* let buggy requests pass */
-			txn->auth_hdr.len = -1;
+		/* we always initialize the HTTP structure because we may use it later */
+		txn->status = -1;
+		txn->req.hdr_content_len = 0LL;
+		txn->rsp.hdr_content_len = 0LL;
+		txn->req.msg_state = HTTP_MSG_RQBEFORE; /* at the very beginning of the request */
+		txn->rsp.msg_state = HTTP_MSG_RPBEFORE; /* at the very beginning of the response */
+		txn->req.sol = txn->req.eol = NULL;
+		txn->req.som = txn->req.eoh = 0; /* relative to the buffer */
+		txn->rsp.sol = txn->rsp.eol = NULL;
+		txn->rsp.som = txn->rsp.eoh = 0; /* relative to the buffer */
+		txn->req.err_pos = txn->rsp.err_pos = -2; /* block buggy requests/responses */
+		txn->auth_hdr.len = -1;
+		if (p->options2 & PR_O2_REQBUG_OK)
+			txn->req.err_pos = -1; /* let buggy requests pass */
 
+		if (p->mode == PR_MODE_HTTP) {
+			/* the captures are only used in HTTP frontends */
 			if (p->nb_req_cap > 0) {
 				if ((txn->req.cap = pool_alloc2(p->req_cap_pool)) == NULL)
 					goto out_fail_reqcap;	/* no memory */
@@ -274,7 +276,6 @@
 				memset(txn->req.cap, 0, p->nb_req_cap*sizeof(char *));
 			}
 
-
 			if (p->nb_rsp_cap > 0) {
 				if ((txn->rsp.cap = pool_alloc2(p->rsp_cap_pool)) == NULL)
 					goto out_fail_rspcap;	/* no memory */