Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send VFP_END with last data for v1f chunked & read ahead #3809

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
9 changes: 7 additions & 2 deletions bin/varnishd/cache/cache_vrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,11 +971,16 @@ VRT_ban_string(VRT_CTX, VCL_STRING str)
VCL_BYTES
VRT_CacheReqBody(VRT_CTX, VCL_BYTES maxsize)
{
const char * const err = "req.body can only be cached in vcl_recv{}";

CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (ctx->method != VCL_MET_RECV) {
VSLb(ctx->vsl, SLT_VCL_Error,
"req.body can only be cached in vcl_recv{}");
if (ctx->vsl != NULL) {
VSLb(ctx->vsl, SLT_VCL_Error, err);
} else {
AN(ctx->msg);
VSB_printf(ctx->msg, "%s\n", err);
};
return (-1);
}
CHECK_OBJ_NOTNULL(ctx->req, REQ_MAGIC);
Expand Down
Loading