Commit e775575d authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Postpone freeing the bereq until after VCL_fetch() has been called


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2184 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 4cc41818
......@@ -310,9 +310,6 @@ cnt_fetch(struct sess *sp)
i = Fetch(sp);
CHECK_OBJ_NOTNULL(sp->backend, BACKEND_MAGIC);
VBE_free_bereq(sp->bereq);
sp->bereq = NULL;
if (!i)
RFC2616_cache_policy(sp, sp->obj->http); /* XXX -> VCL */
else {
......@@ -325,6 +322,9 @@ cnt_fetch(struct sess *sp)
sp->err_code = http_GetStatus(sp->obj->http);
VCL_fetch_method(sp);
VBE_free_bereq(sp->bereq);
sp->bereq = NULL;
switch (sp->handling) {
case VCL_RET_ERROR:
case VCL_RET_RESTART:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment