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
ca6f9513
Commit
ca6f9513
authored
Nov 09, 2016
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plaster some additional assertions for vary processing
Related to #2130
parent
0b2d05cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
cache_vary.c
bin/varnishd/cache/cache_vary.c
+6
-5
No files found.
bin/varnishd/cache/cache_vary.c
View file @
ca6f9513
...
@@ -117,8 +117,8 @@ VRY_Create(struct busyobj *bo, struct vsb **psb)
...
@@ -117,8 +117,8 @@ VRY_Create(struct busyobj *bo, struct vsb **psb)
/* Build a header-matching string out of it */
/* Build a header-matching string out of it */
VSB_clear
(
sbh
);
VSB_clear
(
sbh
);
VSB_printf
(
sbh
,
"%c%.*s:%c"
,
AZ
(
VSB_printf
(
sbh
,
"%c%.*s:%c"
,
(
char
)(
1
+
(
q
-
p
)),
(
int
)(
q
-
p
),
p
,
0
);
(
char
)(
1
+
(
q
-
p
)),
(
int
)(
q
-
p
),
p
,
0
)
)
;
AZ
(
VSB_finish
(
sbh
));
AZ
(
VSB_finish
(
sbh
));
if
(
http_GetHdr
(
bo
->
bereq
,
VSB_data
(
sbh
),
&
h
))
{
if
(
http_GetHdr
(
bo
->
bereq
,
VSB_data
(
sbh
),
&
h
))
{
...
@@ -139,11 +139,11 @@ VRY_Create(struct busyobj *bo, struct vsb **psb)
...
@@ -139,11 +139,11 @@ VRY_Create(struct busyobj *bo, struct vsb **psb)
e
=
h
;
e
=
h
;
l
=
0xffff
;
l
=
0xffff
;
}
}
VSB_printf
(
sb
,
"%c%c"
,
(
int
)(
l
>>
8
),
(
int
)(
l
&
0xff
));
AZ
(
VSB_printf
(
sb
,
"%c%c"
,
(
int
)(
l
>>
8
),
(
int
)(
l
&
0xff
)
));
/* Append to vary matching string */
/* Append to vary matching string */
VSB_bcat
(
sb
,
VSB_data
(
sbh
),
VSB_len
(
sbh
));
AZ
(
VSB_bcat
(
sb
,
VSB_data
(
sbh
),
VSB_len
(
sbh
)
));
if
(
e
!=
h
)
if
(
e
!=
h
)
VSB_bcat
(
sb
,
h
,
e
-
h
);
AZ
(
VSB_bcat
(
sb
,
h
,
e
-
h
)
);
while
(
vct_issp
(
*
q
))
while
(
vct_issp
(
*
q
))
q
++
;
q
++
;
...
@@ -291,6 +291,7 @@ VRY_Match(struct req *req, const uint8_t *vary)
...
@@ -291,6 +291,7 @@ VRY_Match(struct req *req, const uint8_t *vary)
int
i
,
oflo
=
0
;
int
i
,
oflo
=
0
;
AN
(
vsp
);
AN
(
vsp
);
AN
(
vary
);
while
(
vary
[
2
])
{
while
(
vary
[
2
])
{
if
(
vsp
+
2
>=
req
->
vary_e
)
{
if
(
vsp
+
2
>=
req
->
vary_e
)
{
/*
/*
...
...
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