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
728fa08e
Commit
728fa08e
authored
Jan 27, 2015
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assume >, >=, <, <= only apply to numbers
Partially reverts
dc1059da
.
parent
0a1606e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
15 deletions
+7
-15
r00956.vtc
bin/varnishtest/tests/r00956.vtc
+4
-4
vtc_http.c
bin/varnishtest/vtc_http.c
+3
-11
No files found.
bin/varnishtest/tests/r00956.vtc
View file @
728fa08e
...
@@ -36,9 +36,9 @@ client c1 {
...
@@ -36,9 +36,9 @@ client c1 {
expect resp.bodylen == 40
expect resp.bodylen == 40
expect resp.http.fooA == 19.000
expect resp.http.fooA == 19.000
expect resp.http.fooB == 10.000
expect resp.http.fooB == 10.000
expect resp.http.foo
.LE.
8.000
expect resp.http.foo
<=
8.000
expect resp.http.ageA == 4.000
expect resp.http.ageA == 4.000
expect resp.http.ageB
.GE.
6.000
expect resp.http.ageB
>=
6.000
delay 2
delay 2
txreq
txreq
...
@@ -46,7 +46,7 @@ client c1 {
...
@@ -46,7 +46,7 @@ client c1 {
expect resp.bodylen == 40
expect resp.bodylen == 40
expect resp.http.fooA == 19.000
expect resp.http.fooA == 19.000
expect resp.http.fooB == 10.000
expect resp.http.fooB == 10.000
expect resp.http.foo
.LE.
6.000
expect resp.http.foo
<=
6.000
expect resp.http.ageA == 4.000
expect resp.http.ageA == 4.000
expect resp.http.ageB
.GE.
8.000
expect resp.http.ageB
>=
8.000
} -run
} -run
bin/varnishtest/vtc_http.c
View file @
728fa08e
...
@@ -272,20 +272,12 @@ cmd_http_expect(CMD_ARGS)
...
@@ -272,20 +272,12 @@ cmd_http_expect(CMD_ARGS)
// fail inequality comparisons if either side is undef'ed
// fail inequality comparisons if either side is undef'ed
retval
=
0
;
retval
=
0
;
}
else
if
(
!
strcmp
(
cmp
,
"<"
))
{
}
else
if
(
!
strcmp
(
cmp
,
"<"
))
{
retval
=
strcmp
(
lhs
,
rhs
)
<
0
;
}
else
if
(
!
strcmp
(
cmp
,
"<="
))
{
retval
=
strcmp
(
lhs
,
rhs
)
<=
0
;
}
else
if
(
!
strcmp
(
cmp
,
">="
))
{
retval
=
strcmp
(
lhs
,
rhs
)
>=
0
;
}
else
if
(
!
strcmp
(
cmp
,
">"
))
{
retval
=
strcmp
(
lhs
,
rhs
)
>
0
;
}
else
if
(
!
strcmp
(
cmp
,
".LT."
))
{
retval
=
strtod
(
lhs
,
NULL
)
<
strtod
(
rhs
,
NULL
);
retval
=
strtod
(
lhs
,
NULL
)
<
strtod
(
rhs
,
NULL
);
}
else
if
(
!
strcmp
(
cmp
,
"
.GT.
"
))
{
}
else
if
(
!
strcmp
(
cmp
,
"
>
"
))
{
retval
=
strtod
(
lhs
,
NULL
)
>
strtod
(
rhs
,
NULL
);
retval
=
strtod
(
lhs
,
NULL
)
>
strtod
(
rhs
,
NULL
);
}
else
if
(
!
strcmp
(
cmp
,
"
.LE.
"
))
{
}
else
if
(
!
strcmp
(
cmp
,
"
<=
"
))
{
retval
=
strtod
(
lhs
,
NULL
)
<=
strtod
(
rhs
,
NULL
);
retval
=
strtod
(
lhs
,
NULL
)
<=
strtod
(
rhs
,
NULL
);
}
else
if
(
!
strcmp
(
cmp
,
"
.GE.
"
))
{
}
else
if
(
!
strcmp
(
cmp
,
"
>=
"
))
{
retval
=
strtod
(
lhs
,
NULL
)
>=
strtod
(
rhs
,
NULL
);
retval
=
strtod
(
lhs
,
NULL
)
>=
strtod
(
rhs
,
NULL
);
}
}
...
...
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