Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
099c22c0
Commit
099c22c0
authored
Jun 16, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Request specific variables are not available in vcl_init{} and vcl_fini{}
parent
c316746d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
28 deletions
+36
-28
generate.py
lib/libvcl/generate.py
+36
-28
No files found.
lib/libvcl/generate.py
View file @
099c22c0
...
@@ -98,107 +98,110 @@ returns =(
...
@@ -98,107 +98,110 @@ returns =(
#######################################################################
#######################################################################
# Variables available in sessions
# Variables available in sessions
#
# 'all' means all methods
# 'proc' means all methods but 'init' and 'fini'
sp_variables
=
(
sp_variables
=
(
(
'client.ip'
,
(
'client.ip'
,
'IP'
,
'IP'
,
(
'
all
'
,),
(
'
proc
'
,),
(
),
(
),
'const struct sess *'
'const struct sess *'
),
),
(
'client.identity'
,
(
'client.identity'
,
'STRING'
,
'STRING'
,
(
'
all
'
,),
(
'
proc
'
,),
(
'
all
'
,),
(
'
proc
'
,),
'struct sess *'
'struct sess *'
),
),
(
'server.ip'
,
(
'server.ip'
,
'IP'
,
'IP'
,
(
'
all
'
,),
(
'
proc
'
,),
(
),
(
),
'struct sess *'
'struct sess *'
),
),
(
'server.hostname'
,
(
'server.hostname'
,
'STRING'
,
'STRING'
,
(
'
all
'
,),
(
'
proc
'
,),
(
),
(
),
'struct sess *'
'struct sess *'
),
),
(
'server.identity'
,
(
'server.identity'
,
'STRING'
,
'STRING'
,
(
'
all
'
,),
(
'
proc
'
,),
(
),
(
),
'struct sess *'
'struct sess *'
),
),
(
'server.port'
,
(
'server.port'
,
'INT'
,
'INT'
,
(
'
all
'
,),
(
'
proc
'
,),
(
),
(
),
'struct sess *'
'struct sess *'
),
),
(
'req.request'
,
(
'req.request'
,
'STRING'
,
'STRING'
,
(
'
all
'
,),
(
'
proc
'
,),
(
'
all
'
,),
(
'
proc
'
,),
'const struct sess *'
'const struct sess *'
),
),
(
'req.url'
,
(
'req.url'
,
'STRING'
,
'STRING'
,
(
'
all
'
,),
(
'
proc
'
,),
(
'
all
'
,),
(
'
proc
'
,),
'const struct sess *'
'const struct sess *'
),
),
(
'req.proto'
,
(
'req.proto'
,
'STRING'
,
'STRING'
,
(
'
all
'
,),
(
'
proc
'
,),
(
'
all
'
,),
(
'
proc
'
,),
'const struct sess *'
'const struct sess *'
),
),
(
'req.http.'
,
(
'req.http.'
,
'HDR_REQ'
,
'HDR_REQ'
,
(
'
all
'
,),
(
'
proc
'
,),
(
'
all
'
,),
(
'
proc
'
,),
'const struct sess *'
'const struct sess *'
),
),
(
'req.backend'
,
(
'req.backend'
,
'BACKEND'
,
'BACKEND'
,
(
'
all
'
,),
(
'
proc
'
,),
(
'
all
'
,),
(
'
proc
'
,),
'struct sess *'
'struct sess *'
),
),
(
'req.restarts'
,
(
'req.restarts'
,
'INT'
,
'INT'
,
(
'
all
'
,),
(
'
proc
'
,),
(
),
(
),
'const struct sess *'
'const struct sess *'
),
),
(
'req.esi_level'
,
(
'req.esi_level'
,
'INT'
,
'INT'
,
(
'
all
'
,),
(
'
proc
'
,),
(
),
(
),
'const struct sess *'
'const struct sess *'
),
),
(
'req.ttl'
,
(
'req.ttl'
,
'DURATION'
,
'DURATION'
,
(
'
all
'
,),
(
'
proc
'
,),
(
'
all
'
,),
(
'
proc
'
,),
'struct sess *'
'struct sess *'
),
),
(
'req.grace'
,
(
'req.grace'
,
'DURATION'
,
'DURATION'
,
(
'
all
'
,),
(
'
proc
'
,),
(
'
all
'
,),
(
'
proc
'
,),
'struct sess *'
'struct sess *'
),
),
(
'req.keep'
,
(
'req.keep'
,
'DURATION'
,
'DURATION'
,
(
'
all
'
,),
(
'
proc
'
,),
(
'
all
'
,),
(
'
proc
'
,),
'struct sess *'
'struct sess *'
),
),
(
'req.xid'
,
(
'req.xid'
,
'STRING'
,
'STRING'
,
(
'
all
'
,),
(
'
proc
'
,),
(
),
(
),
'struct sess *'
'struct sess *'
),
),
...
@@ -210,13 +213,13 @@ sp_variables = (
...
@@ -210,13 +213,13 @@ sp_variables = (
),
),
(
'req.can_gzip'
,
(
'req.can_gzip'
,
'BOOL'
,
'BOOL'
,
(
'
all
'
,),
(
'
proc
'
,),
(
),
(
),
'struct sess *'
'struct sess *'
),
),
(
'req.backend.healthy'
,
(
'req.backend.healthy'
,
'BOOL'
,
'BOOL'
,
(
'
all
'
,),
(
'
proc
'
,),
(
),
(
),
'const struct sess *'
'const struct sess *'
),
),
...
@@ -773,6 +776,11 @@ def restrict(fo, spec):
...
@@ -773,6 +776,11 @@ def restrict(fo, spec):
return
return
if
spec
[
0
]
==
'all'
:
if
spec
[
0
]
==
'all'
:
spec
=
vcls
spec
=
vcls
if
spec
[
0
]
==
'proc'
:
spec
=
list
()
for
i
in
vcls
:
if
i
!=
"init"
and
i
!=
"fini"
:
spec
.
append
(
i
)
p
=
""
p
=
""
n
=
0
n
=
0
for
j
in
spec
:
for
j
in
spec
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment