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
49a2600e
Commit
49a2600e
authored
Dec 21, 2018
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quote VSL fields that are known to contain spaces
The test case covers the last field of Backend_health records.
parent
e6193fb4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
9 deletions
+24
-9
cache_acceptor.c
bin/varnishd/cache/cache_acceptor.c
+1
-1
cache_backend_probe.c
bin/varnishd/cache/cache_backend_probe.c
+1
-1
r02872.vtc
bin/varnishtest/tests/r02872.vtc
+16
-1
vsl_tags.h
include/tbl/vsl_tags.h
+6
-6
No files found.
bin/varnishd/cache/cache_acceptor.c
View file @
49a2600e
...
...
@@ -508,7 +508,7 @@ vca_accept_task(struct worker *wrk, void *arg)
lport
,
VTCP_PORTBUFSIZE
);
}
VSL
(
SLT_SessError
,
0
,
"%s %s %s %d %d
%s
"
,
VSL
(
SLT_SessError
,
0
,
"%s %s %s %d %d
\"
%s
\"
"
,
wa
.
acceptlsock
->
name
,
laddr
,
lport
,
ls
->
sock
,
i
,
vstrerror
(
i
));
(
void
)
Pool_TrySumstat
(
wrk
);
...
...
bin/varnishd/cache/cache_backend_probe.c
View file @
49a2600e
...
...
@@ -181,7 +181,7 @@ VBP_Update_Backend(struct vbp_target *vt)
vt
->
backend
->
sick
=
i
;
AN
(
dir
->
vcl_name
);
VSL
(
SLT_Backend_health
,
0
,
"%s %s %s %s %u %u %u %.6f %.6f
%s
"
,
VSL
(
SLT_Backend_health
,
0
,
"%s %s %s %s %u %u %u %.6f %.6f
\"
%s
\"
"
,
dir
->
vcl_name
,
chg
?
"Went"
:
"Still"
,
i
?
"sick"
:
"healthy"
,
bits
,
vt
->
good
,
vt
->
threshold
,
vt
->
window
,
...
...
bin/varnishtest/tests/r02872.vtc
View file @
49a2600e
varnishtest "VSL quoted fields"
server s1 {
rxreq
txresp
} -start
varnish v1 -vcl {
import std;
backend be none;
backend be {
.host = "${s1_sock}";
.probe = { .interval = 1m; }
}
sub vcl_recv {
# a series of 3-fields log records
std.log({" custom log "ok" "});
...
...
@@ -24,3 +32,10 @@ client c1 {
shell -expect "2" {
varnishlog -d -n ${v1_name} -g raw -q 'VCL_Log[3]' | wc -l
}
server s1 -wait
shell -expect "Went healthy" {
varnishlog -d -n ${v1_name} -g raw \
-q 'Backend_health[10] eq "HTTP/1.1 200 OK"'
}
include/tbl/vsl_tags.h
View file @
49a2600e
...
...
@@ -191,7 +191,7 @@ SLTM(Length, 0, "Size of object body",
SLTM
(
FetchError
,
0
,
"Error while fetching object"
,
"Logs the error message of a failed fetch operation.
\n\n
"
"Error messages should be self-explanatory, yet the http connection"
"Error messages should be self-explanatory, yet the http connection
\n
"
"(HTC) class of errors is reported with these symbols:
\n\n
"
"
\t
* junk (-5): Received unexpected data
\n
"
"
\t
* close (-4): Connection closed
\n
"
...
...
@@ -272,11 +272,11 @@ SLTM(TTL, 0, "TTL set on object",
SLTM
(
Fetch_Body
,
0
,
"Body fetched from backend"
,
"Ready to fetch body from backend.
\n\n
"
"The format is::
\n\n
"
"
\t
%d
(%s)
%s
\n
"
"
\t
|
|
|
\n
"
"
\t
|
|
+---- 'stream' or '-'
\n
"
"
\t
|
+--
------- Text description of body fetch mode
\n
"
"
\t
+----------
---
Body fetch mode
\n
"
"
\t
%d
%s
%s
\n
"
"
\t
|
|
|
\n
"
"
\t
|
|
+---- 'stream' or '-'
\n
"
"
\t
|
+
------- Text description of body fetch mode
\n
"
"
\t
+---------- Body fetch mode
\n
"
"
\n
"
)
...
...
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