Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-frozen
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-frozen
Commits
273d0c05
Commit
273d0c05
authored
Mar 18, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle NULL input
parent
c6423d0f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
vmod_frozen.c
src/vmod_frozen.c
+4
-0
vmod_frozen.vtc
src/vtc/vmod_frozen.vtc
+3
-0
No files found.
src/vmod_frozen.c
View file @
273d0c05
...
...
@@ -231,6 +231,10 @@ vmod_parser_parse(VRT_CTX, struct vmod_frozen_parser *vfpaa,
INIT_FROZEN_ARGS
(
args
);
args
->
limit
=
vfpa
->
limit
;
if
(
s
==
NULL
)
{
return
(
0
);
}
if
(
vfpa
->
n_expect
==
0
)
return
(
!!
json_walk_args
(
s
,
strlen
(
s
),
args
));
...
...
src/vtc/vmod_frozen.vtc
View file @
273d0c05
...
...
@@ -28,6 +28,7 @@ varnish v1 -vcl+backend {
return (synth(200));
}
sub vcl_synth {
set resp.http.fail = p_test.parse(req.http.not);
set resp.http.parse =
p_test.parse({"{ a: 1, b: "hi there", c: true, d: false, "} +
{" e : null, f: [ 1, -2, 3], g: { "1": [], h: [ 7 ] } } "});
...
...
@@ -70,6 +71,8 @@ client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.http.fail == false
expect resp.http.parse == true
expect resp.http.a == 1
expect resp.http.a-type == NUMBER
expect resp.http.b == "hi there"
...
...
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