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
1
Issues
1
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
uplex-varnish
libvmod-backend_dyn
Commits
bf8730b8
Commit
bf8730b8
authored
Nov 08, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test r00942.vtc
parent
e8ba96e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
0 deletions
+89
-0
r00942.vtc
src/tests/r00942.vtc
+89
-0
No files found.
src/tests/r00942.vtc
0 → 100644
View file @
bf8730b8
varnishtest "#942 junk after gzip from backend"
server s1 {
rxreq
txresp -nolen \
-hdr "Content-Encoding: gzip" \
-hdr "Connection: close" \
-hdr "Transfer-Encoding: Chunked"
send "14\r\n"
# An empty gzip file:
sendhex "1f8b"
sendhex "08"
sendhex "00"
sendhex "00000000"
sendhex "00"
sendhex "03"
sendhex "0300"
sendhex "00000000"
sendhex "00000000"
send "\r\n"
chunked "FOOBAR"
non-fatal
chunkedlen 0
} -start
varnish v1 -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_stream = false;
if (bereq.http.foo == "foo") {
set beresp.do_gunzip = true;
}
}
}
varnish v1 -cliok "param.set debug +syncvsl"
varnish v1 -start
client c1 {
txreq -url /1
rxresp
expect resp.status == 503
} -run
server s1 -wait {
fatal
rxreq
txresp -nolen \
-hdr "Content-Encoding: gzip" \
-hdr "Connection: close" \
-hdr "Transfer-Encoding: Chunked"
send "14\r\n"
# An empty gzip file:
sendhex "1f8b"
sendhex "08"
sendhex "00"
sendhex "00000000"
sendhex "00"
sendhex "03"
sendhex "0300"
sendhex "00000000"
sendhex "00000000"
send "\r\n"
chunked "FOOBAR"
non-fatal
chunkedlen 0
} -start
client c1 {
txreq -url /2 -hdr "Foo: foo"
rxresp
expect resp.status == 503
} -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