Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
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
unique-xids
Commits
a39ba3d8
Commit
a39ba3d8
authored
Jan 22, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the esi-parse torture logic part of the esi_parser code
so it applies to all fetch methods.
parent
2700f6cd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
cache_esi_deliver.c
bin/varnishd/cache_esi_deliver.c
+0
-1
cache_esi_fetch.c
bin/varnishd/cache_esi_fetch.c
+1
-11
cache_esi_parse.c
bin/varnishd/cache_esi_parse.c
+17
-2
No files found.
bin/varnishd/cache_esi_deliver.c
View file @
a39ba3d8
...
@@ -259,4 +259,3 @@ ESI_Deliver(struct sess *sp)
...
@@ -259,4 +259,3 @@ ESI_Deliver(struct sess *sp)
}
}
(
void
)
WRW_Flush
(
sp
->
wrk
);
(
void
)
WRW_Flush
(
sp
->
wrk
);
}
}
bin/varnishd/cache_esi_fetch.c
View file @
a39ba3d8
...
@@ -64,16 +64,6 @@ vfp_esi_bytes_uu(struct sess *sp, struct http_conn *htc, size_t bytes)
...
@@ -64,16 +64,6 @@ vfp_esi_bytes_uu(struct sess *sp, struct http_conn *htc, size_t bytes)
w
=
HTC_Read
(
htc
,
st
->
ptr
+
st
->
len
,
l
);
w
=
HTC_Read
(
htc
,
st
->
ptr
+
st
->
len
,
l
);
if
(
w
<=
0
)
if
(
w
<=
0
)
return
(
w
);
return
(
w
);
if
(
params
->
esi_syntax
&
0x8
)
{
ssize_t
d
;
for
(
l
=
0
;
l
<
w
;
l
+=
d
)
{
d
=
(
random
()
&
3
)
+
1
;
if
(
l
+
d
>=
w
)
d
=
1
;
VEP_parse
(
sp
,
(
const
char
*
)
st
->
ptr
+
st
->
len
+
l
,
d
);
}
}
else
VEP_parse
(
sp
,
(
const
char
*
)
st
->
ptr
+
st
->
len
,
w
);
VEP_parse
(
sp
,
(
const
char
*
)
st
->
ptr
+
st
->
len
,
w
);
st
->
len
+=
w
;
st
->
len
+=
w
;
sp
->
obj
->
len
+=
w
;
sp
->
obj
->
len
+=
w
;
...
...
bin/varnishd/cache_esi_parse.c
View file @
a39ba3d8
...
@@ -539,8 +539,8 @@ vep_do_include(struct vep_state *vep, enum dowhat what)
...
@@ -539,8 +539,8 @@ vep_do_include(struct vep_state *vep, enum dowhat what)
* NB: the state-machine. Please maintain it along with the code.
* NB: the state-machine. Please maintain it along with the code.
*/
*/
void
static
void
VEP_parse
(
const
struct
sess
*
sp
,
const
char
*
p
,
size_t
l
)
vep_parse_int
(
const
struct
sess
*
sp
,
const
char
*
p
,
size_t
l
)
{
{
struct
vep_state
*
vep
;
struct
vep_state
*
vep
;
const
char
*
e
;
const
char
*
e
;
...
@@ -965,6 +965,21 @@ VEP_parse(const struct sess *sp, const char *p, size_t l)
...
@@ -965,6 +965,21 @@ VEP_parse(const struct sess *sp, const char *p, size_t l)
vep_mark_pending
(
vep
,
p
);
vep_mark_pending
(
vep
,
p
);
}
}
void
VEP_parse
(
const
struct
sess
*
sp
,
const
char
*
p
,
size_t
w
)
{
ssize_t
l
,
d
;
if
(
params
->
esi_syntax
&
0x8
)
{
for
(
l
=
0
;
l
<
w
;
l
+=
d
)
{
d
=
(
random
()
&
3
)
+
1
;
if
(
l
+
d
>=
w
)
d
=
1
;
vep_parse_int
(
sp
,
p
+
l
,
d
);
}
}
else
vep_parse_int
(
sp
,
p
,
w
);
}
/*---------------------------------------------------------------------
/*---------------------------------------------------------------------
*/
*/
...
...
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