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
efc4154b
Commit
efc4154b
authored
Sep 19, 2013
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add '!=' operator to query language
parent
18f5b8b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
l00001.vtc
bin/varnishtest/tests/l00001.vtc
+7
-0
vsl_query.c
lib/libvarnishapi/vsl_query.c
+9
-0
No files found.
bin/varnishtest/tests/l00001.vtc
View file @
efc4154b
...
...
@@ -36,3 +36,10 @@ logexpect l1 -d 1 -g vxid -q "RespStatus == 200" {
expect * = ReqEnd
expect * = End
} -run
# Test '!=' operator
logexpect l1 -d 1 -g vxid -q "RespStatus != 503" {
expect * * Begin req
expect * = ReqEnd
expect * = End
} -run
lib/libvarnishapi/vsl_query.c
View file @
efc4154b
...
...
@@ -103,6 +103,15 @@ vslq_test_rec(const struct vex *vex, const struct VSLC_ptr *rec)
default:
INCOMPL
();
}
case
T_NEQ
:
/* != */
switch
(
val
->
type
)
{
case
VEX_INT
:
if
(
val
->
val_int
!=
recint
)
return
(
1
);
return
(
0
);
default:
INCOMPL
();
}
case
T_SEQ
:
/* eq */
assert
(
val
->
type
==
VEX_STRING
);
if
(
reclen
==
val
->
val_stringlen
+
1
&&
...
...
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