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
43757b25
Unverified
Commit
43757b25
authored
Dec 15, 2020
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
varnishncsa: handle inexistent fields
fixes #3485
parent
b609a537
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
varnishncsa.c
bin/varnishncsa/varnishncsa.c
+2
-1
u00003.vtc
bin/varnishtest/tests/u00003.vtc
+4
-4
No files found.
bin/varnishncsa/varnishncsa.c
View file @
43757b25
...
...
@@ -797,7 +797,8 @@ frag_fields(int force, const char *b, const char *e, ...)
n
++
;
}
assert
(
p
!=
NULL
&&
q
!=
NULL
);
assert
(
p
<
e
&&
q
>
p
);
if
(
p
>=
e
||
q
<=
p
)
continue
;
if
(
frag
->
gen
!=
CTX
.
gen
||
force
)
{
/* We only grab the same matching field once */
frag
->
gen
=
CTX
.
gen
;
...
...
bin/varnishtest/tests/u00003.vtc
View file @
43757b25
...
...
@@ -142,12 +142,12 @@ shell -match {^\d+.\d{6} miss miss c 1001 quuz
%{Varnish:vxid}x %{VCL_Log:quux}x"}
# %{VSL:..}x
shell -match {^req (\d+) rxreq \1 \d{10}\.\d{6} (\d+\.\d{6}) \d+\.\d{6} \2 -
req (\d+) rxreq \3 \d{10}\.\d{6} (\d+\.\d{6}) \d+\.\d{6} \4 -
req (\d+) rxreq \5 - - -$} \
shell -match {^req (\d+) rxreq \1 \d{10}\.\d{6} (\d+\.\d{6}) \d+\.\d{6} \2 -
-
req (\d+) rxreq \3 \d{10}\.\d{6} (\d+\.\d{6}) \d+\.\d{6} \4 -
-
req (\d+) rxreq \5 - - -
-
$} \
{varnishncsa -n ${v1_name} -d -F "%{VSL:Begin}x \
%{VSL:Begin[2]}x %{VSL:Timestamp:Resp}x \
%{VSL:Timestamp:Resp[2]}x %{VSL:Timestamp:foo}x"}
%{VSL:Timestamp:Resp[2]}x %{VSL:Timestamp:foo}x
%{VSL:ReqURL[2]}x
"}
process p1 -stop -screen-dump
process p1 -expect-text 1 0 {/1?foo=bar HTTP/1.1" 200 100 "-" "-"}
...
...
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