src/proto_http.c
static int
smp_fetch_meth(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
               const struct arg *args, struct sample *smp)
{
	int meth;
	struct http_txn *txn = l7;

	CHECK_HTTP_MESSAGE_FIRST_PERM();

	meth = txn->meth;
	smp->type = SMP_T_UINT;
	smp->data.uint = meth;
	if (meth == HTTP_METH_OTHER) {
		if (txn->rsp.msg_state != HTTP_MSG_RPBEFORE)
			/* ensure the indexes are not affected */
			return 0;
		smp->type = SMP_T_CSTR;
		smp->data.str.len = txn->req.sl.rq.m_l;
		smp->data.str.str = txn->req.chn->buf->p;
	}
	smp->flags = SMP_F_VOL_1ST;
	return 1;
}
/* This function fetches the method of current HTTP request and stores
 * it in the global pattern struct as a chunk. There are two possibilities :
 *   - if the method is known (not HTTP_METH_OTHER), its identifier is stored
 *     in <len> and <ptr> is NULL ;
 *   - if the method is unknown (HTTP_METH_OTHER), <ptr> points to the text and
 *     <len> to its length.
 * This is intended to be used with acl_match_meth() only.
 */
This function fetches the method of current HTTP request and stores
it in the global pattern struct as a chunk. There are two possibilities :
- if the method is known (not HTTP_METH_OTHER), its identifier is stored
in  and  is NULL ;
- if the method is unknown (HTTP_METH_OTHER),  points to the text and
 to its length.
This is intended to be used with acl_match_meth() only.
This function fetches the method of current HTTP request and stores it in the global pattern struct as a chunk . There are two possibilities : - if the method is known ( not HTTP_METH_OTHER ) its identifier is stored in and is NULL ; - if the method is unknown ( HTTP_METH_OTHER ) points to the text and to its length . This is intended to be used with acl_match_meth () only .
static int
smp_fetch_meth(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
               const struct arg *args, struct sample *smp)
{
	int meth;
	struct http_txn *txn = l7;
	CHECK_HTTP_MESSAGE_FIRST_PERM();
	meth = txn->meth;
	smp->type = SMP_T_UINT;
	smp->data.uint = meth;
	if (meth == HTTP_METH_OTHER) {
		if (txn->rsp.msg_state != HTTP_MSG_RPBEFORE)
			return 0;
		smp->type = SMP_T_CSTR;
		smp->data.str.len = txn->req.sl.rq.m_l;
		smp->data.str.str = txn->req.chn->buf->p;
	}
	smp->flags = SMP_F_VOL_1ST;
	return 1;
}
static int smp_fetch_meth ( struct proxy * px , struct session * l4 , void * l7 , unsigned int opt , const struct arg * args , struct sample * smp ) { int meth ; struct http_txn * txn = l7 ; CHECK_HTTP_MESSAGE_FIRST_PERM ( ) ; meth = txn -> meth ; smp -> type = SMP_T_UINT ; smp -> data . uint = meth ; if ( meth == HTTP_METH_OTHER ) { if ( txn -> rsp . msg_state != HTTP_MSG_RPBEFORE ) return 0 ; smp -> type = SMP_T_CSTR ; smp -> data . str . len = txn -> req . sl . rq . m_l ; smp -> data . str . str = txn -> req . chn -> buf -> p ; } smp -> flags = SMP_F_VOL_1ST ; return 1 ; }
This function fetches the method of current HTTP request and stores
 it in the global pattern struct as a chunk.
This function fetches the method of current HTTP request and stores it in the global pattern struct as a chunk .
/* ensure the indexes are not affected */