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
c984e5d3
Commit
c984e5d3
authored
Apr 19, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Look for VFP's also on the per-vcl list
parent
ad69f04e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
3 deletions
+32
-3
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+1
-1
cache_varnishd.h
bin/varnishd/cache/cache_varnishd.h
+1
-1
cache_vcl_vrt.c
bin/varnishd/cache/cache_vcl_vrt.c
+9
-1
m00048.vtc
bin/varnishtest/tests/m00048.vtc
+21
-0
No files found.
bin/varnishd/cache/cache_fetch.c
View file @
c984e5d3
...
...
@@ -606,7 +606,7 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
}
if
(
bo
->
filter_list
==
NULL
||
VCL_StackVFP
(
bo
->
vfc
,
bo
->
filter_list
))
{
VCL_StackVFP
(
bo
->
vfc
,
bo
->
vcl
,
bo
->
filter_list
))
{
(
bo
)
->
htc
->
doclose
=
SC_OVERLOAD
;
VDI_Finish
((
bo
)
->
wrk
,
bo
);
return
(
F_STP_ERROR
);
...
...
bin/varnishd/cache/cache_varnishd.h
View file @
c984e5d3
...
...
@@ -407,7 +407,7 @@ int VCL_IterDirector(struct cli *, const char *, vcl_be_func *, void *);
/* cache_vcl_vrt.c */
void
VCL_VRT_Init
(
void
);
int
VCL_StackVFP
(
struct
vfp_ctx
*
,
const
char
*
);
int
VCL_StackVFP
(
struct
vfp_ctx
*
,
const
struct
vcl
*
,
const
char
*
);
/* cache_vrt.c */
void
VRTPRIV_init
(
struct
vrt_privs
*
privs
);
...
...
bin/varnishd/cache/cache_vcl_vrt.c
View file @
c984e5d3
...
...
@@ -470,7 +470,7 @@ VRT_RemoveVFP(VRT_CTX, const struct vfp *filter)
}
int
VCL_StackVFP
(
struct
vfp_ctx
*
vc
,
const
char
*
fl
)
VCL_StackVFP
(
struct
vfp_ctx
*
vc
,
const
struct
vcl
*
vcl
,
const
char
*
fl
)
{
const
char
*
p
,
*
q
;
const
struct
vfp_filter
*
vp
;
...
...
@@ -491,6 +491,14 @@ VCL_StackVFP(struct vfp_ctx *vc, const char *fl)
if
(
!
memcmp
(
p
,
vp
->
filter
->
name
,
vp
->
nlen
))
break
;
}
if
(
vp
==
NULL
)
{
VTAILQ_FOREACH
(
vp
,
&
vcl
->
vfps
,
list
)
{
if
(
vp
->
nlen
!=
q
-
p
)
continue
;
if
(
!
memcmp
(
p
,
vp
->
filter
->
name
,
vp
->
nlen
))
break
;
}
}
if
(
vp
==
NULL
)
return
(
VFP_Error
(
vc
,
"Filter '%.*s' not found"
,
(
int
)(
q
-
p
),
p
));
...
...
bin/varnishtest/tests/m00048.vtc
0 → 100644
View file @
c984e5d3
varnishtest "VMOD vfp"
server s1 {
rxreq
txresp -body "Ponto Facto, Caesar Transit!"
} -start
varnish v1 -vcl+backend {
import debug;
sub vcl_backend_response {
set beresp.filters = "rot13";
}
} -start
client c1 {
txreq
rxresp
expect resp.body == "Cbagb Snpgb, Pnrfne Genafvg!"
} -run
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