Commit 24fc322e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Prune the bits we used from the input buffer before we recycle the

session.


git-svn-id: http://www.varnish-cache.org/svn/trunk@128 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent c3947114
......@@ -94,8 +94,16 @@ PassSession(struct worker *w, struct sess *sp)
break;
}
}
assert(cl == 0);
}
/* XXX: move remaining input in sp->rcv */
/* XXX: return session to acceptor */
if (sp->rcv_len > sp->hdr_end) {
memmove(sp->rcv, sp->rcv + sp->hdr_end,
sp->rcv_len - sp->hdr_end);
sp->rcv_len -= sp->hdr_end;
sp->rcv[sp->rcv_len] = '\0';
} else {
sp->rcv_len = 0;
sp->rcv[sp->rcv_len] = '\0';
}
}
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