BUG/MINOR: http-ana: Set method to HTTP_METH_OTHER when an HTTP txn is created

This patch is required to fix "method" sample fetch. But it make sense to
initialize the method of an HTTP transaction to HTTP_METH_OTHER. This way,
before the request parsing, the method is considered as unknown except if we
are able to retrieve the request start-line. It is especially important for
TCP streams.

About the "method" sample fetch, this patch is a way to be sure no random
method is returned when the sample fetch is used on a TCP stream before any
HTTP parsing.

This patch must be backported as far as 2.0.

(cherry picked from commit 5eb67f5d7400fce75cf429d09af31464ed0eabfc)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 66b96b9cb1b0d2cae4e903f1ffef649ddee736a0)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 5bfad52b17a49e9f9c325787ebecce43fdb522ff)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/http_ana.c b/src/http_ana.c
index c561d1b..d420f4b 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -5192,6 +5192,7 @@
 		return NULL;
 	s->txn = txn;
 
+	txn->meth = HTTP_METH_OTHER;
 	txn->flags = ((cs && cs->flags & CS_FL_NOT_FIRST) ? TX_NOT_FIRST : 0);
 	txn->status = -1;
 	txn->http_reply = NULL;