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
84fce665
Commit
84fce665
authored
Mar 11, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stackspace canary: test with more realistic header sizes
Closes #2932
parent
9e048812
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
8 deletions
+84
-8
v00004.vtc
bin/varnishtest/tests/v00004.vtc
+84
-8
No files found.
bin/varnishtest/tests/v00004.vtc
View file @
84fce665
...
...
@@ -5,7 +5,18 @@ varnishtest "canary to tell us if our default stacksize is too tight..."
server s1 {
rxreq
expect req.http.esi0 == "foo"
txresp -gzipbody {
txresp \
-hdr "Content-Type: text/html;charset=utf-8" \
-hdr "Content-Language: en-US" \
-hdr "X-UA-Compatible: IE=Edge" \
-hdr "X-Content-Type-Options: nosniff" \
-hdr "Content-Security-Policy-Report-Only: script-src 'unsafe-inline' 'unsafe-eval' 'self' blob: data: https:; style-src 'self' 'unsafe-inline' blob: data: https:; default-src 'self' https:; img-src https: blob: data: android-webview-video-poster:; frame-src blob: data: https:; worker-src blob: data: https:; child-src blob: data: https:; object-src 'self'; font-src 'self' https: blob: data: safari-extension://*; media-src 'self' blob: data: https:; connect-src wss: blob: data: https:; report-uri /csp_ep" \
-hdr "Content-Security-Policy: upgrade-insecure-requests" \
-hdr "Server: MySecretServerSauce" \
-hdr "Cache-Control: public, max-age=90" \
-hdr "Connection: keep-alive" \
-hdr "Vary: Accept-Encoding, Origin" \
-gzipbody {
<html>
Before include
<esi:include
src=
"/a"
sr=
"foo"
/>
...
...
@@ -16,7 +27,18 @@ server s1 {
rxreq
expect req.url == "/a1"
expect req.http.esi0 != "foo"
txresp -gzipbody {
txresp \
-hdr "Content-Type: text/html;charset=utf-8" \
-hdr "Content-Language: en-US" \
-hdr "X-UA-Compatible: IE=Edge" \
-hdr "X-Content-Type-Options: nosniff" \
-hdr "Content-Security-Policy-Report-Only: script-src 'unsafe-inline' 'unsafe-eval' 'self' blob: data: https:; style-src 'self' 'unsafe-inline' blob: data: https:; default-src 'self' https:; img-src https: blob: data: android-webview-video-poster:; frame-src blob: data: https:; worker-src blob: data: https:; child-src blob: data: https:; object-src 'self'; font-src 'self' https: blob: data: safari-extension://*; media-src 'self' blob: data: https:; connect-src wss: blob: data: https:; report-uri /csp_ep" \
-hdr "Content-Security-Policy: upgrade-insecure-requests" \
-hdr "Server: MySecretServerSauce" \
-hdr "Cache-Control: public, max-age=90" \
-hdr "Connection: keep-alive" \
-hdr "Vary: Accept-Encoding, Origin" \
-gzipbody {
<html>
Before include
<esi:include
src=
"/b"
sr=
"foo"
/>
...
...
@@ -27,7 +49,18 @@ server s1 {
rxreq
expect req.url == "/b2"
expect req.http.esi0 != "foo"
txresp -gzipbody {
txresp \
-hdr "Content-Type: text/html;charset=utf-8" \
-hdr "Content-Language: en-US" \
-hdr "X-UA-Compatible: IE=Edge" \
-hdr "X-Content-Type-Options: nosniff" \
-hdr "Content-Security-Policy-Report-Only: script-src 'unsafe-inline' 'unsafe-eval' 'self' blob: data: https:; style-src 'self' 'unsafe-inline' blob: data: https:; default-src 'self' https:; img-src https: blob: data: android-webview-video-poster:; frame-src blob: data: https:; worker-src blob: data: https:; child-src blob: data: https:; object-src 'self'; font-src 'self' https: blob: data: safari-extension://*; media-src 'self' blob: data: https:; connect-src wss: blob: data: https:; report-uri /csp_ep" \
-hdr "Content-Security-Policy: upgrade-insecure-requests" \
-hdr "Server: MySecretServerSauce" \
-hdr "Cache-Control: public, max-age=90" \
-hdr "Connection: keep-alive" \
-hdr "Vary: Accept-Encoding, Origin" \
-gzipbody {
<html>
Before include
<esi:include
src=
"/c"
sr=
"foo"
/>
...
...
@@ -38,7 +71,18 @@ server s1 {
rxreq
expect req.url == "/c3"
expect req.http.esi0 != "foo"
txresp -gzipbody {
txresp \
-hdr "Content-Type: text/html;charset=utf-8" \
-hdr "Content-Language: en-US" \
-hdr "X-UA-Compatible: IE=Edge" \
-hdr "X-Content-Type-Options: nosniff" \
-hdr "Content-Security-Policy-Report-Only: script-src 'unsafe-inline' 'unsafe-eval' 'self' blob: data: https:; style-src 'self' 'unsafe-inline' blob: data: https:; default-src 'self' https:; img-src https: blob: data: android-webview-video-poster:; frame-src blob: data: https:; worker-src blob: data: https:; child-src blob: data: https:; object-src 'self'; font-src 'self' https: blob: data: safari-extension://*; media-src 'self' blob: data: https:; connect-src wss: blob: data: https:; report-uri /csp_ep" \
-hdr "Content-Security-Policy: upgrade-insecure-requests" \
-hdr "Server: MySecretServerSauce" \
-hdr "Cache-Control: public, max-age=90" \
-hdr "Connection: keep-alive" \
-hdr "Vary: Accept-Encoding, Origin" \
-gzipbody {
<html>
Before include
<esi:include
src=
"/d"
sr=
"foo"
/>
...
...
@@ -49,7 +93,18 @@ server s1 {
rxreq
expect req.url == "/d4"
expect req.http.esi0 != "foo"
txresp -gzipbody {
txresp \
-hdr "Content-Type: text/html;charset=utf-8" \
-hdr "Content-Language: en-US" \
-hdr "X-UA-Compatible: IE=Edge" \
-hdr "X-Content-Type-Options: nosniff" \
-hdr "Content-Security-Policy-Report-Only: script-src 'unsafe-inline' 'unsafe-eval' 'self' blob: data: https:; style-src 'self' 'unsafe-inline' blob: data: https:; default-src 'self' https:; img-src https: blob: data: android-webview-video-poster:; frame-src blob: data: https:; worker-src blob: data: https:; child-src blob: data: https:; object-src 'self'; font-src 'self' https: blob: data: safari-extension://*; media-src 'self' blob: data: https:; connect-src wss: blob: data: https:; report-uri /csp_ep" \
-hdr "Content-Security-Policy: upgrade-insecure-requests" \
-hdr "Server: MySecretServerSauce" \
-hdr "Cache-Control: public, max-age=90" \
-hdr "Connection: keep-alive" \
-hdr "Vary: Accept-Encoding, Origin" \
-gzipbody {
<html>
Before include
<esi:include
src=
"/e"
sr=
"foo"
/>
...
...
@@ -60,7 +115,18 @@ server s1 {
rxreq
expect req.url == "/e5"
expect req.http.esi0 != "foo"
txresp -gzipbody {
txresp \
-hdr "Content-Type: text/html;charset=utf-8" \
-hdr "Content-Language: en-US" \
-hdr "X-UA-Compatible: IE=Edge" \
-hdr "X-Content-Type-Options: nosniff" \
-hdr "Content-Security-Policy-Report-Only: script-src 'unsafe-inline' 'unsafe-eval' 'self' blob: data: https:; style-src 'self' 'unsafe-inline' blob: data: https:; default-src 'self' https:; img-src https: blob: data: android-webview-video-poster:; frame-src blob: data: https:; worker-src blob: data: https:; child-src blob: data: https:; object-src 'self'; font-src 'self' https: blob: data: safari-extension://*; media-src 'self' blob: data: https:; connect-src wss: blob: data: https:; report-uri /csp_ep" \
-hdr "Content-Security-Policy: upgrade-insecure-requests" \
-hdr "Server: MySecretServerSauce" \
-hdr "Cache-Control: public, max-age=90" \
-hdr "Connection: keep-alive" \
-hdr "Vary: Accept-Encoding, Origin" \
-gzipbody {
<html>
LAST
</html>
...
...
@@ -82,7 +148,7 @@ varnish v1 -vcl+backend {
sub recv8 { call recv9; std.log("STK recv8 " + debug.stk()); }
sub recv9 {
std.log("STK recv9 " + debug.stk());
set req.http.regex = regsub(req.
url
, "(.*)", "\1\1\1\1\1\1\1\1");
set req.http.regex = regsub(req.
http.cookie
, "(.*)", "\1\1\1\1\1\1\1\1");
set req.http.regex = regsub(req.http.regex, "(.*)",
"\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1");
# hey geoff, this is deliberate
...
...
@@ -111,7 +177,17 @@ varnish v1 -vcl+backend {
varnish v1 -cliok "param.set debug +syncvsl"
client c1 {
txreq -hdr "Host: foo"
txreq \
-hdr "Host: foo" \
-hdr "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0" \
-hdr "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*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0fp6+GJiNwfSJbjTi3GK2o9E9t8qfLr0Avzjj9rqPG2G5MBxZMjg" \
-hdr "DNT: 1" \
-hdr "Connection: keep-alive" \
-hdr "Upgrade-Insecure-Requests: 1" \
-hdr {If-None-Match: W/"9060a5e7924af13779c0437265ad2f1c}
rxresp
expect resp.status == 200
...
...
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