Commit 6d9bf8b0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add req.restarts variable.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2066 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 066cf506
......@@ -21,6 +21,7 @@ void VRT_l_req_proto(const struct sess *, const char *, ...);
void VRT_l_req_hash(struct sess *, const char *);
struct backend * VRT_r_req_backend(struct sess *);
void VRT_l_req_backend(struct sess *, struct backend *);
int VRT_r_req_restarts(const struct sess *);
const char * VRT_r_bereq_request(const struct sess *);
void VRT_l_bereq_request(const struct sess *, const char *, ...);
const char * VRT_r_bereq_url(const struct sess *);
......
......@@ -530,6 +530,7 @@ vcl_output_lang_h(struct vsb *sb)
vsb_cat(sb, "void VRT_l_req_hash(struct sess *, const char *);\n");
vsb_cat(sb, "struct backend * VRT_r_req_backend(struct sess *);\n");
vsb_cat(sb, "void VRT_l_req_backend(struct sess *, struct backend *);\n");
vsb_cat(sb, "int VRT_r_req_restarts(const struct sess *);\n");
vsb_cat(sb, "const char * VRT_r_bereq_request(const struct sess *);\n");
vsb_cat(sb, "void VRT_l_bereq_request(const struct sess *, const char *, ...);\n");
vsb_cat(sb, "const char * VRT_r_bereq_url(const struct sess *);\n");
......
......@@ -92,6 +92,11 @@ set spobj {
{recv pipe pass hash miss hit fetch }
"struct sess *"
}
{ req.restarts
RO INT
{recv pipe pass hash miss hit fetch deliver }
"const struct sess *"
}
# Request sent to backend
{ bereq.request
......
......@@ -98,6 +98,13 @@ struct var vcc_vars[] = {
0,
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH
},
{ "req.restarts", INT, 12,
"VRT_r_req_restarts(sp)",
NULL,
V_RO,
0,
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
},
{ "bereq.request", STRING, 13,
"VRT_r_bereq_request(sp)",
"VRT_l_bereq_request(sp, ",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment