1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
Index: bin/varnishd/cache_response.c
===================================================================
--- bin/varnishd/cache_response.c (revision 1749)
+++ bin/varnishd/cache_response.c (revision 1750)
@@ -76,8 +76,8 @@
http_PrintfHeader(sp->wrk, sp->fd, sp->http, "X-Varnish: %u", sp->xid);
TIM_format(sp->obj->last_modified, lm);
http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Last-Modified: %s", lm);
- if (sp->doclose != NULL)
- http_SetHeader(sp->wrk, sp->fd, sp->http, "Connection: close");
+ http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Connection: %s",
+ sp->doclose ? "close" : "keep-alive");
sp->wantbody = 0;
}
@@ -129,8 +129,8 @@
http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Age: %.0f",
sp->obj->age + sp->t_resp - sp->obj->entered);
http_SetHeader(sp->wrk, sp->fd, sp->http, "Via: 1.1 varnish");
- if (sp->doclose != NULL)
- http_SetHeader(sp->wrk, sp->fd, sp->http, "Connection: close");
+ http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Connection: %s",
+ sp->doclose ? "close" : "keep-alive");
}
/*--------------------------------------------------------------------*/
|