Commit a7619d36 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Merge r4980: Emit Length for client side right before ReqEnd, to summarize ESI...

Merge r4980: Emit Length for client side right before ReqEnd, to summarize ESI transactions correctly.

Only emit Length and ReqEnd if we have an XID.

Fixes: #709
Fixes: #720



git-svn-id: http://www.varnish-cache.org/svn/branches/2.1@5028 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ddcef4a1
......@@ -246,12 +246,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;
......
......@@ -50,8 +50,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");
......@@ -203,8 +201,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