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
f2604159
Commit
f2604159
authored
Apr 16, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a read-only beresp.filters variable which doesn't return that yet.
parent
12610fd5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
1 deletion
+38
-1
cache.h
bin/varnishd/cache/cache.h
+1
-0
cache_vrt_var.c
bin/varnishd/cache/cache_vrt_var.c
+24
-0
a00000.vtc
bin/varnishtest/tests/a00000.vtc
+1
-1
e00023.vtc
bin/varnishtest/tests/e00023.vtc
+2
-0
e00028.vtc
bin/varnishtest/tests/e00028.vtc
+2
-0
vcl_var.rst
doc/sphinx/reference/vcl_var.rst
+8
-0
No files found.
bin/varnishd/cache/cache.h
View file @
f2604159
...
...
@@ -388,6 +388,7 @@ struct busyobj {
struct
worker
*
wrk
;
struct
vfp_ctx
*
vfc
;
char
*
filter_list
;
struct
ws
ws
[
1
];
uintptr_t
ws_bo
;
...
...
bin/varnishd/cache/cache_vrt_var.c
View file @
f2604159
...
...
@@ -36,6 +36,7 @@
#include "common/heritage.h"
#include "vcl.h"
#include "vct.h"
#include "cache_director.h"
#include "vrt_obj.h"
...
...
@@ -913,3 +914,26 @@ HTTP_VAR(req)
HTTP_VAR
(
resp
)
HTTP_VAR
(
bereq
)
HTTP_VAR
(
beresp
)
/*--------------------------------------------------------------------*/
VCL_STRING
VRT_r_beresp_filters
(
VRT_CTX
)
{
const
char
*
p
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
ctx
->
bo
,
BUSYOBJ_MAGIC
);
if
(
ctx
->
bo
->
filter_list
!=
NULL
)
return
(
ctx
->
bo
->
filter_list
);
#if 1
p
=
"Not Yet"
;
#else
p
=
VBF_Get_Filter_List
(
ctx
->
bo
);
WS_Release
(
ctx
->
bo
->
ws
,
strlen
(
p
)
+
1
);
#endif
while
(
vct_isspace
(
*
p
))
p
++
;
return
(
p
);
}
bin/varnishtest/tests/a00000.vtc
View file @
f2604159
...
...
@@ -72,7 +72,7 @@ process p4 -need-bytes 310 -expect-text 3 1 "line3 <"
process p4 -expect-cursor 4 1
process p4 -expect-cursor 4 0
process p4 -expect-cursor 0 1
process p4 -screen-dump
process p4 -screen-dump
# Also exercise CONS25 mode
process p4 -write "\x1b[=1T"
...
...
bin/varnishtest/tests/e00023.vtc
View file @
f2604159
...
...
@@ -37,7 +37,9 @@ server s1 {
varnish v1 -vcl+backend {
sub vcl_backend_response {
set beresp.http.filter1 = beresp.filters;
set beresp.do_esi = true;
set beresp.http.filter2 = beresp.filters;
}
} -start
...
...
bin/varnishtest/tests/e00028.vtc
View file @
f2604159
...
...
@@ -36,12 +36,14 @@ server s1 {
varnish v1 -arg "-p feature=+esi_disable_xml_check" -vcl+backend {
sub vcl_backend_response {
set beresp.http.filters1 = beresp.filters;
set beresp.do_esi = true;
if (bereq.url ~ "/baz") {
set beresp.do_gzip = true;
} elif (bereq.url ~ "/foo(bar|baz|qux)") {
set beresp.do_gunzip = true;
}
set beresp.http.filters2 = beresp.filters;
}
} -start
...
...
doc/sphinx/reference/vcl_var.rst
View file @
f2604159
...
...
@@ -895,6 +895,14 @@ beresp.storage_hint ``VCL <= 4.0``
Hint to Varnish that you want to save this object to a
particular storage backend.
beresp.filters
Type: STRING
Readable from: vcl_backend_response
List of VFP filters the beresp.body will be pulled through.
obj
~~~
...
...
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