Commit 9371b61d authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't attempt IMS on zero-length objects

parent a90a35f5
......@@ -160,7 +160,7 @@ vbf_beresp2obj(struct busyobj *bo)
*/
static enum fetch_step
vbf_stp_mkbereq(const struct worker *wrk, struct busyobj *bo)
vbf_stp_mkbereq(struct worker *wrk, struct busyobj *bo)
{
const char *q;
......@@ -187,7 +187,8 @@ vbf_stp_mkbereq(const struct worker *wrk, struct busyobj *bo)
AZ(bo->stale_oc);
if (bo->stale_oc != NULL &&
ObjCheckFlag(bo->wrk, bo->stale_oc, OF_IMSCAND)) {
ObjCheckFlag(bo->wrk, bo->stale_oc, OF_IMSCAND) &&
(bo->stale_oc->boc != NULL || ObjGetLen(wrk, bo->stale_oc) != 0)) {
q = HTTP_GetHdrPack(bo->wrk, bo->stale_oc, H_Last_Modified);
if (q != NULL)
http_PrintfHeader(bo->bereq0,
......
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