Commit 58e0a04f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Emit Length for client side right before ReqEnd, to summarize ESI

transactions correctly.

Only Emmit Length and ReqEnd if we have an XID.

Fixes: #709
Fixes: #720



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4980 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 2f9a2985
......@@ -245,12 +245,14 @@ cnt_done(struct sess *sp)
if (sp->xid == 0) {
sp->t_req = sp->t_end;
sp->t_resp = sp->t_end;
} else {
dp = sp->t_resp - sp->t_req;
da = sp->t_end - sp->t_resp;
dh = sp->t_req - sp->t_open;
WSP(sp, SLT_Length, "%u", sp->acct_req.bodybytes);
WSL(sp->wrk, SLT_ReqEnd, sp->id, "%u %.9f %.9f %.9f %.9f %.9f",
sp->xid, sp->t_req, sp->t_end, dh, dp, da);
}
dp = sp->t_resp - sp->t_req;
da = sp->t_end - sp->t_resp;
dh = sp->t_req - sp->t_open;
WSL(sp->wrk, SLT_ReqEnd, sp->id, "%u %.9f %.9f %.9f %.9f %.9f",
sp->xid, sp->t_req, sp->t_end, dh, dp, da);
sp->xid = 0;
sp->t_open = sp->t_end;
......
......@@ -49,8 +49,6 @@ res_do_304(struct sess *sp)
char lm[64];
char *p;
WSP(sp, SLT_Length, "%u", 0);
http_ClrHeader(sp->wrk->resp);
sp->wrk->resp->logtag = HTTP_Tx;
http_SetResp(sp->wrk->resp, "HTTP/1.1", "304", "Not Modified");
......@@ -202,8 +200,6 @@ RES_BuildHttp(struct sess *sp)
if (sp->obj->response == 200 && sp->http->conds && res_do_conds(sp))
return;
WSP(sp, SLT_Length, "%u", sp->obj->len);
http_ClrHeader(sp->wrk->resp);
sp->wrk->resp->logtag = HTTP_Tx;
http_CopyResp(sp->wrk->resp, sp->obj->http);
......
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