Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-esicookies
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-esicookies
Commits
7bd89652
Commit
7bd89652
authored
Oct 16, 2014
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct http_nv return code for neither name/value vs. no seperator
parent
85dfe7b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
vmod_esicookies.c
src/vmod_esicookies.c
+16
-6
No files found.
src/vmod_esicookies.c
View file @
7bd89652
...
...
@@ -326,7 +326,8 @@ http_split(txt *where, const char *sep, txt *tok)
* return 0 if no seperator found (or only whitespace in where)
* 1 otherwise
*
* name/value contain a NULL pointer if not found
* name/value contain a NULL pointers if not found
* otherwise assert(Tlen(name/value) > 0)
*/
static
int
http_nv
(
const
txt
where
,
const
char
*
sep
,
txt
*
name
,
txt
*
value
)
...
...
@@ -342,18 +343,27 @@ http_nv(const txt where, const char *sep, txt *name, txt *value)
if
(
http_split
(
&
work
,
sep
,
name
)
==
0
)
{
/*
* only whitespace or seperator found: if the where argu
em
nt
* only whitespace or seperator found: if the where argu
me
nt
* came from http_split, it implies we only have a seperator
* with no name
or
value
* with no name
and no
value
*/
value
->
b
=
NULL
;
value
->
e
=
NULL
;
return
(
1
);
}
if
(
work
.
b
>=
where
.
e
)
/* no seperator found */
return
(
0
);
if
(
work
.
b
>=
where
.
e
)
{
if
(
name
->
b
==
where
.
b
)
/* no seperator found */
return
(
0
);
value
->
b
=
name
->
b
;
value
->
e
=
name
->
e
;
name
->
b
=
NULL
;
name
->
e
=
NULL
;
return
(
1
);
}
(
void
)
http_split
(
&
work
,
sep
,
value
);
...
...
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