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
298475eb
Commit
298475eb
authored
May 07, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the default return from recv and hash methods point to the
next method we'll end up in.
parent
3592eeda
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
12 deletions
+12
-12
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+2
-2
default.vcl
bin/varnishd/default.vcl
+2
-2
c00033.vtc
bin/varnishtest/tests/c00033.vtc
+1
-1
r00444.vtc
bin/varnishtest/tests/r00444.vtc
+1
-1
r00965.vtc
bin/varnishtest/tests/r00965.vtc
+2
-2
r01030.vtc
bin/varnishtest/tests/r01030.vtc
+1
-1
r01296.vtc
bin/varnishtest/tests/r01296.vtc
+1
-1
generate.py
lib/libvcl/generate.py
+2
-2
No files found.
bin/varnishd/cache/cache_req_fsm.c
View file @
298475eb
...
...
@@ -1172,7 +1172,7 @@ cnt_recv(struct worker *wrk, struct req *req)
req
->
sha256ctx
=
&
sha256ctx
;
/* so HSH_AddString() can find it */
SHA256_Init
(
req
->
sha256ctx
);
VCL_hash_method
(
req
->
vcl
,
wrk
,
req
,
NULL
,
req
->
http
->
ws
);
assert
(
wrk
->
handling
==
VCL_RET_
HASH
);
assert
(
wrk
->
handling
==
VCL_RET_
LOOKUP
);
SHA256_Final
(
req
->
digest
,
req
->
sha256ctx
);
req
->
sha256ctx
=
NULL
;
...
...
@@ -1182,7 +1182,7 @@ cnt_recv(struct worker *wrk, struct req *req)
req
->
wantbody
=
1
;
switch
(
recv_handling
)
{
case
VCL_RET_
LOOKUP
:
case
VCL_RET_
HASH
:
req
->
req_step
=
R_STP_LOOKUP
;
return
(
REQ_FSM_MORE
);
case
VCL_RET_PIPE
:
...
...
bin/varnishd/default.vcl
View file @
298475eb
...
...
@@ -66,7 +66,7 @@ sub vcl_recv {
/* Not cacheable by default */
return (pass);
}
return (
lookup
);
return (
hash
);
}
sub vcl_pipe {
...
...
@@ -90,7 +90,7 @@ sub vcl_hash {
} else {
hash_data(server.ip);
}
return (
hash
);
return (
lookup
);
}
sub vcl_lookup {
...
...
bin/varnishtest/tests/c00033.vtc
View file @
298475eb
...
...
@@ -19,7 +19,7 @@ varnish v1 -vcl+backend {
sub vcl_recv {
if (req.method == "PURGE") {
return (
lookup
);
return (
hash
);
}
}
...
...
bin/varnishtest/tests/r00444.vtc
View file @
298475eb
...
...
@@ -22,7 +22,7 @@ varnish v1 -vcl+backend {
sub vcl_recv {
if (req.method == "POST") {
/* Lookup so we find any cached object */
return (
lookup
);
return (
hash
);
}
}
sub vcl_lookup {
...
...
bin/varnishtest/tests/r00965.vtc
View file @
298475eb
...
...
@@ -14,7 +14,7 @@ varnish v1 -vcl+backend {
if (req.http.x-pass) {
return (pass);
} else {
return (
lookup
);
return (
hash
);
}
}
}
...
...
@@ -23,7 +23,7 @@ varnish v1 -vcl+backend {
## Check if they have a ban in the cache, or if they are going to be banned in cache.
if (req.http.X-Banned) {
hash_data(client.ip);
return (
hash
);
return (
lookup
);
}
}
...
...
bin/varnishtest/tests/r01030.vtc
View file @
298475eb
...
...
@@ -18,7 +18,7 @@ varnish v1 -vcl+backend {
ban("obj.http.url ~ /");
error 201 "banned";
}
return (
lookup
);
return (
hash
);
}
sub vcl_backend_response {
set beresp.http.url = bereq.url;
...
...
bin/varnishtest/tests/r01296.vtc
View file @
298475eb
...
...
@@ -15,7 +15,7 @@ varnish v1 -vcl+backend {
} else {
hash_data("1" + req.http.foo + "3");
}
return (
hash
);
return (
lookup
);
}
} -start
...
...
lib/libvcl/generate.py
View file @
298475eb
...
...
@@ -78,10 +78,10 @@ tokens = {
# Our methods and actions
returns
=
(
(
'recv'
,
"C"
,
(
'error'
,
'pass'
,
'pipe'
,
'
lookup
'
,)),
(
'recv'
,
"C"
,
(
'error'
,
'pass'
,
'pipe'
,
'
hash
'
,)),
(
'pipe'
,
"C"
,
(
'error'
,
'pipe'
,)),
(
'pass'
,
"C"
,
(
'error'
,
'restart'
,
'pass'
,)),
(
'hash'
,
"C"
,
(
'
hash
'
,)),
(
'hash'
,
"C"
,
(
'
lookup
'
,)),
(
'miss'
,
"C"
,
(
'error'
,
'restart'
,
'pass'
,
'fetch'
,)),
(
'lookup'
,
"C"
,
(
'error'
,
'restart'
,
'pass'
,
'deliver'
,)),
(
'backend_fetch'
,
"B"
,
(
'fetch'
,
'pass'
,)),
...
...
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