Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvdp-pesi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
uplex-varnish
libvdp-pesi
Commits
ff7d20a2
Commit
ff7d20a2
authored
Jul 30, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d-oh this is wrong in varnish-cache
https://github.com/varnishcache/varnish-cache/issues/3028
parent
433a007d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
cache_esi_deliver.c
src/foreign/cache_esi_deliver.c
+16
-4
No files found.
src/foreign/cache_esi_deliver.c
View file @
ff7d20a2
...
@@ -105,23 +105,35 @@ vped_pretend_gzip_bytes(struct req *req, enum vdp_action act, void **priv,
...
@@ -105,23 +105,35 @@ vped_pretend_gzip_bytes(struct req *req, enum vdp_action act, void **priv,
while
(
l
>
0
)
{
while
(
l
>
0
)
{
if
(
l
>=
65535
)
{
if
(
l
>=
65535
)
{
lx
=
65535
;
lx
=
65535
;
if
(
VDP_bytes
(
req
,
VDP_
NULL
,
buf1
,
sizeof
buf1
))
if
(
VDP_bytes
(
req
,
VDP_
FLUSH
,
buf1
,
sizeof
buf1
))
return
(
-
1
);
return
(
-
1
);
}
else
{
}
else
{
lx
=
(
uint16_t
)
l
;
lx
=
(
uint16_t
)
l
;
buf2
[
0
]
=
0
;
buf2
[
0
]
=
0
;
vle16enc
(
buf2
+
1
,
lx
);
vle16enc
(
buf2
+
1
,
lx
);
vle16enc
(
buf2
+
3
,
~
lx
);
vle16enc
(
buf2
+
3
,
~
lx
);
if
(
VDP_bytes
(
req
,
VDP_
NULL
,
buf2
,
sizeof
buf2
))
if
(
VDP_bytes
(
req
,
VDP_
FLUSH
,
buf2
,
sizeof
buf2
))
return
(
-
1
);
return
(
-
1
);
}
}
if
(
VDP_bytes
(
req
,
VDP_
NULL
,
p
,
lx
))
if
(
VDP_bytes
(
req
,
VDP_
FLUSH
,
p
,
lx
))
return
(
-
1
);
return
(
-
1
);
l
-=
lx
;
l
-=
lx
;
p
+=
lx
;
p
+=
lx
;
}
}
/*
* https://github.com/varnishcache/varnish-cache/issues/3028
*
* the original code has VDP_NULL above, and this flush from below, how
* can this possibly work? who guarantees that our stackframe is still
* intact when we get called the next time?
*
* XXX revisit
*/
#ifdef ORIGINAL_CODE
/* buf1 & buf2 is local, have to flush */
/* buf1 & buf2 is local, have to flush */
return
(
VDP_bytes
(
req
,
VDP_FLUSH
,
NULL
,
0
));
//return (VDP_bytes(req, VDP_FLUSH, NULL, 0));
#endif
return
(
0
);
}
}
const
struct
vdp
vped_pretend_gz
=
{
const
struct
vdp
vped_pretend_gz
=
{
...
...
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