Commit 83c03a89 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Single test for Range-qualifying request

parent 138e67f6
......@@ -202,8 +202,6 @@ V1D_Deliver(struct req *req)
http_PrintfHeader(req->resp,
"Content-Length: %zd", req->obj->len);
}
if (cache_param->http_range_support)
http_SetHeader(req->resp, "Accept-Ranges: bytes");
}
if (req->esi_level > 0) {
......@@ -255,9 +253,11 @@ V1D_Deliver(struct req *req)
req->wantbody &&
!(req->res_mode & (RES_ESI|RES_ESI_CHILD)) &&
cache_param->http_range_support &&
req->obj->response == 200 &&
http_GetHdr(req->http, H_Range, &r))
req->obj->response == 200) {
http_SetHeader(req->resp, "Accept-Ranges: bytes");
if (http_GetHdr(req->http, H_Range, &r))
v1d_dorange(req, r);
}
WRW_Reserve(req->wrk, &req->sp->fd, req->vsl, req->t_resp);
......
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