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
b1b2c9fd
Commit
b1b2c9fd
authored
Jun 17, 2024
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log workspace overflow in activate().
parent
38cff6d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
2 deletions
+42
-2
workspace.vtc
src/tests/workspace.vtc
+36
-0
vmod_pesi.c
src/vmod_pesi.c
+6
-2
No files found.
src/tests/workspace.vtc
0 → 100644
View file @
b1b2c9fd
varnishtest "log workspace overflow in pesi.activate()"
server s1 {
rxreq
txresp -body {<esi:include src="/include"/>}
# Include bereq never sent due to ws overflow.
} -start
varnish v1 -vcl+backend {
import ${vmod_pesi};
import ${vmod_pesi_debug};
import vtc;
include "debug.inc.vcl";
sub vcl_backend_response {
set beresp.do_esi = true;
}
sub vcl_deliver {
# Not enough left over for "pesi"
vtc.workspace_alloc(client, -3);
pesi.activate();
}
} -start
logexpect l1 -v v1 -g vxid -d 0 -q {Error ~ "^vdp pesi"} {
expect 0 * Begin {^req \d+ rxreq$}
expect * = Error {^vdp pesi: workspace overflow in activate}
} -start
client c1 {
txreq
rxresp
} -start
logexpect l1 -wait
src/vmod_pesi.c
View file @
b1b2c9fd
...
...
@@ -180,14 +180,18 @@ pesi_filter_on_ws(struct ws *ws, pesi_filter_list_t *func, void *arg)
{
struct
vsb
vsb
[
1
];
const
char
*
p
;
struct
req
*
req
;
AN
(
func
);
AN
(
arg
);
CAST_OBJ_NOTNULL
(
req
,
arg
,
REQ_MAGIC
);
WS_VSB_new
(
vsb
,
ws
);
func
(
arg
,
vsb
);
p
=
WS_VSB_finish
(
vsb
,
ws
,
NULL
);
if
(
p
==
NULL
)
if
(
p
==
NULL
)
{
p
=
""
;
VSLb
(
req
->
vsl
,
SLT_Error
,
"vdp pesi: workspace overflow "
"in activate()"
);
}
return
(
p
);
}
...
...
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