Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-backend_dyn
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carl P. Corliss
libvmod-backend_dyn
Commits
5e36127a
Commit
5e36127a
authored
Nov 08, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test g00002.vtc
parent
2851f4b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
0 deletions
+69
-0
g00002.vtc
src/tests/g00002.vtc
+69
-0
No files found.
src/tests/g00002.vtc
0 → 100644
View file @
5e36127a
varnishtest "test basic gunzip for client"
server s1 {
rxreq
expect req.http.accept-encoding == "gzip"
expect req.url == "/foo"
txresp -proto HTTP/1.0 -nolen -gziplen 4100
accept
rxreq
expect req.url == "/bar"
txresp -body {<H1><esi:include src="/foo"/></H1>}
} -start
varnish v1 \
-arg "-smalloc,2m" \
-cliok "param.set http_gzip_support true" \
-cliok "param.set gzip_memlevel 1" \
-vcl {
import backend_dyn from "${vmod_topbuild}/src/.libs/libvmod_backend_dyn.so";
backend dummy { .host = "${bad_ip}"; }
sub vcl_init {
if (!backend_dyn.create(name="be", host="${s1_addr}",
port="${s1_port}")) {
return(fail);
}
}
sub vcl_recv {
set req.backend_hint = backend_dyn.by_name("be");
}
sub vcl_backend_response {
set beresp.do_esi = true;
}
} -start
varnish v1 -cliok "param.set fetch_chunksize 4k"
varnish v1 -cliok "param.set vsl_mask +VfpAcct"
client c1 {
txreq -url /foo -hdr "Accept-Encoding: gzip"
rxresp
gunzip
expect resp.http.content-encoding == "gzip"
expect resp.bodylen == 4100
} -run
# If this fails, the multiple storage allocations did not happen
varnish v1 -expect SMA.s0.c_req > 2
client c1 {
# See varnish can gunzip it.
txreq -url /foo -hdr "Accept-Encoding: null"
rxresp
expect resp.http.content-encoding == <undef>
expect resp.bodylen == 4100
delay .1
# See varnish can gunzip it, inside ESI
txreq -url /bar -hdr "Accept-Encoding: null"
rxresp
expect resp.http.content-encoding == <undef>
expect resp.bodylen == 4109
} -run
varnish v1 -expect VBE.vcl1.be.happy == 0
varnish v1 -expect MAIN.n_backend == 2
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