From 4d4e9f7f2a079290bad85275ac9146b49df1a32e Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Wed, 8 Feb 2012 23:09:12 +0000 Subject: [PATCH] Use the req workspace, not the worker workspace, as we cannot trust that to be the same throughout the request. --- lib/libvmod_std/vmod_std.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libvmod_std/vmod_std.c b/lib/libvmod_std/vmod_std.c index b2ab419e8c..e363b2da13 100644 --- a/lib/libvmod_std/vmod_std.c +++ b/lib/libvmod_std/vmod_std.c @@ -58,8 +58,8 @@ vmod_updown(struct sess *sp, int up, const char *s, va_list ap) const char *p; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); - u = WS_Reserve(sp->wrk->ws, 0); - e = b = sp->wrk->ws->f; + u = WS_Reserve(sp->req->ws, 0); + e = b = sp->req->ws->f; e += u; p = s; while (p != vrt_magic_string_end && b < e) { @@ -76,12 +76,12 @@ vmod_updown(struct sess *sp, int up, const char *s, va_list ap) *b = '\0'; b++; if (b > e) { - WS_Release(sp->wrk->ws, 0); + WS_Release(sp->req->ws, 0); return (NULL); } else { e = b; - b = sp->wrk->ws->f; - WS_Release(sp->wrk->ws, e - b); + b = sp->req->ws->f; + WS_Release(sp->req->ws, e - b); return (b); } }