for example through TCP request content inspection. Please see the "tcp-request
content" keyword for more detailed information on the subject.
+Warning : Following sample fetches are ignored if used from HTTP proxies. They
+ only deal with raw contents found in the buffers. On their side,
+ HTTTP proxies use structured content. Thus raw representation of
+ these data are meaningless. A warning is emitted if an ACL relies on
+ one of the following sample fetches. But it is not possible to detect
+ all invalid usage (for instance inside a log-format string or a
+ sample expression). So be careful.
+
payload(<offset>,<length>) : binary (deprecated)
This is an alias for "req.payload" when used in the context of a request (e.g.
"stick on", "stick match"), and for "res.payload" when used in the context of
{
if (smp->strm) {
struct channel *chn = ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
+
+ /* Not accurate but kept for backward compatibility purpose */
if (IS_HTX_STRM(smp->strm)) {
struct htx *htx = htxbuf(&chn->buf);
smp->data.u.sint = htx->data - co_data(chn);
}
else if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK) {
struct check *check = __objt_check(smp->sess->origin);
+
+ /* Not accurate but kept for backward compatibility purpose */
smp->data.u.sint = ((check->cs && IS_HTX_CS(check->cs)) ? (htxbuf(&check->bi))->data: b_data(&check->bi));
}
else
if (!smp->strm)
goto not_ssl_hello;
+ /* meaningless for HTX buffers */
+ if (IS_HTX_STRM(smp->strm))
+ goto not_ssl_hello;
+
chn = ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
+
+
bleft = ci_data(chn);
data = (unsigned char *)ci_head(chn);
if (!smp->strm)
goto not_ssl_hello;
+ /* meaningless for HTX buffers */
+ if (IS_HTX_STRM(smp->strm))
+ goto not_ssl_hello;
+
chn = ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
bleft = ci_data(chn);
data = (unsigned char *)ci_head(chn);
if (!smp->strm)
goto not_ssl_hello;
+ /* meaningless for HTX buffers */
+ if (IS_HTX_STRM(smp->strm))
+ goto not_ssl_hello;
+
chn = ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
bleft = ci_data(chn);
data = (const unsigned char *)ci_head(chn);
struct channel *req;
if (!smp->strm)
- return 0;
+ goto not_ssl;
+
+ /* meaningless for HTX buffers */
+ if (IS_HTX_STRM(smp->strm))
+ goto not_ssl;
req = &smp->strm->req;
msg_len = 0;
if (!smp->strm)
goto not_ssl_hello;
+ /* meaningless for HTX buffers */
+ if (IS_HTX_STRM(smp->strm))
+ goto not_ssl_hello;
+
chn = ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
bleft = ci_data(chn);
data = (unsigned char *)ci_head(chn);
if (!smp->strm)
goto not_ssl_hello;
+ /* meaningless for HTX buffers */
+ if (IS_HTX_STRM(smp->strm))
+ goto not_ssl_hello;
+
chn = ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
bleft = ci_data(chn);
data = (unsigned char *)ci_head(chn);
if (!smp->strm)
return 0;
+ /* meaningless for HTX buffers */
+ if (IS_HTX_STRM(smp->strm))
+ return 0;
+
return fetch_rdp_cookie_name(smp->strm, smp,
args ? args->data.str.area : NULL,
args ? args->data.str.data : 0);
/* buf offset could be absolute or relative to len offset + len size if prefixed by + or - */
if (smp->strm) {
+ /* meaningless for HTX buffers */
+ if (IS_HTX_STRM(smp->strm))
+ return 0;
chn = ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
head = ci_head(chn);
data = ci_data(chn);
}
else if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK) {
- struct buffer *buf = &(__objt_check(smp->sess->origin)->bi);
- head = b_head(buf);
- data = b_data(buf);
+ struct check *check = __objt_check(smp->sess->origin);
+
+ /* meaningless for HTX buffers */
+ if (check->cs && IS_HTX_CS(check->cs))
+ return 0;
+ head = b_head(&check->bi);
+ data = b_data(&check->bi);
}
max = global.tune.bufsize;
if (!head)
size_t max, data;
if (smp->strm) {
+ /* meaningless for HTX buffers */
+ if (IS_HTX_STRM(smp->strm))
+ return 0;
chn = ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
head = ci_head(chn);
data = ci_data(chn);
}
else if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK) {
- struct buffer *buf = &(__objt_check(smp->sess->origin)->bi);
- head = b_head(buf);
- data = b_data(buf);
+ struct check *check = __objt_check(smp->sess->origin);
+
+ /* meaningless for HTX buffers */
+ if (check->cs && IS_HTX_CS(check->cs))
+ return 0;
+ head = b_head(&check->bi);
+ data = b_data(&check->bi);
}
max = global.tune.bufsize;
if (!head)
if (!smp->strm)
return 0;
+ /* meaningless for HTX buffers */
+ if (IS_HTX_STRM(smp->strm))
+ return 0;
+
chn = ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
ofs = 0; occ = 0;
if (!smp->strm)
return 0;
+ /* meaningless for HTX buffers */
+ if (IS_HTX_STRM(smp->strm))
+ return 0;
+
chn = ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
ofs = 0; occ = 0;