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

Enable Range: for ESI requests

parent be77dbca
......@@ -70,8 +70,8 @@ VDP_push(struct req *req, vdp_bytes *func, void *priv)
AZ(vdp->func(req, VDP_INIT, &vdp->priv, NULL, 0));
}
void
VDP_pop(struct req *req, vdp_bytes *func)
static void
vdp_pop(struct req *req, vdp_bytes *func)
{
struct vdp_entry *vdp;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
......@@ -91,5 +91,5 @@ VDP_close(struct req *req)
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
while (!VTAILQ_EMPTY(&req->vdp))
VDP_pop(req, VTAILQ_FIRST(&req->vdp)->func);
vdp_pop(req, VTAILQ_FIRST(&req->vdp)->func);
}
......@@ -107,7 +107,6 @@ struct vdp_entry {
int VDP_bytes(struct req *, enum vdp_action act, const void *ptr, ssize_t len);
void VDP_push(struct req *, vdp_bytes *func, void *priv);
void VDP_pop(struct req *, vdp_bytes *func);
void VDP_close(struct req *req);
vdp_bytes VDP_gunzip;
......
......@@ -318,7 +318,7 @@ V1D_Deliver(struct req *req, struct busyobj *bo)
if (
req->wantbody &&
!(req->res_mode & (RES_ESI|RES_ESI_CHILD)) &&
req->esi_level == 0 &&
cache_param->http_range_support &&
http_IsStatus(req->resp, 200)) {
http_SetHeader(req->resp, "Accept-Ranges: bytes");
......
......@@ -30,7 +30,7 @@ varnish v1 -vcl+backend {
logexpect l1 -v v1 -g request {
expect 0 1001 Begin "^req .* rxreq"
expect * = ReqAcct "^18 0 18 154 75 229$"
expect * = ReqAcct "^18 0 18 176 75 251$"
expect 0 = End
expect 0 1002 Begin "^bereq "
......@@ -44,7 +44,7 @@ logexpect l1 -v v1 -g request {
expect * = End
expect 0 1005 Begin "^req .* rxreq"
expect * = ReqAcct "^18 0 18 159 75 234$"
expect * = ReqAcct "^18 0 18 181 75 256$"
expect 0 = End
} -start
......
......@@ -48,7 +48,7 @@ varnish v1 -vcl+backend {
logexpect l1 -v v1 -g request {
expect 0 1001 Begin "^req .* rxreq"
expect * = ReqAcct "^18 0 18 71 15 86$"
expect * = ReqAcct "^18 0 18 93 15 108$"
expect 0 = End
expect * 1003 Begin "^req .* esi"
expect * = ReqAcct "^0 0 0 0 12 12$"
......@@ -72,5 +72,5 @@ logexpect l1 -wait
varnish v1 -expect s_req_hdrbytes == 18
varnish v1 -expect s_req_bodybytes == 0
varnish v1 -expect s_resp_hdrbytes == 71
varnish v1 -expect s_resp_hdrbytes == 93
varnish v1 -expect s_resp_bodybytes == 33
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