Unverified Commit 4646a5bd authored by Dridi Boukelmoune's avatar Dridi Boukelmoune Committed by Nils Goroll

builtin: Adopt our C code style for the builtin VCL

I removed the else keyword from vcl_backend_response because it doesn't
add any value.

Better diff with the --ignore-all-space option.
parent 5b89fb4f
...@@ -73,10 +73,10 @@ sub vcl_recv { ...@@ -73,10 +73,10 @@ sub vcl_recv {
} }
sub vcl_pipe { sub vcl_pipe {
# By default Connection: close is set on all piped requests, to stop # By default "Connection: close" is set on all piped requests, to stop
# connection reuse from sending future requests directly to the # connection reuse from sending future requests directly to the
# (potentially) wrong backend. If you do want this to happen, you can undo # (potentially) wrong backend. If you do want this to happen, you can
# it here. # undo it here:
# unset bereq.http.connection; # unset bereq.http.connection;
return (pipe); return (pipe);
} }
...@@ -148,7 +148,8 @@ sub vcl_backend_fetch { ...@@ -148,7 +148,8 @@ sub vcl_backend_fetch {
sub vcl_backend_response { sub vcl_backend_response {
if (bereq.uncacheable) { if (bereq.uncacheable) {
return (deliver); return (deliver);
} else if (beresp.ttl <= 0s || }
if (beresp.ttl <= 0s ||
beresp.http.Set-Cookie || beresp.http.Set-Cookie ||
beresp.http.Surrogate-control ~ "(?i)no-store" || beresp.http.Surrogate-control ~ "(?i)no-store" ||
(!beresp.http.Surrogate-Control && (!beresp.http.Surrogate-Control &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment