Do not bundle empty files

parent 207116cf
......@@ -578,14 +578,18 @@ vdp_zipsub_init(VRT_CTX, struct vdp_ctx *vdc, void **priv, struct objcore *oc)
zft = zipsub_take(zfr);
req = vdc->req;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
if (req->resp_len == 0)
zfr->bundle = 0;
if (zfr->bundle) {
fill_meta(ctx, zfr);
AZ(zip_meta(zft->zip, zfr->name, 3, zfr->mode,
(uint32_t)zfr->atime, (uint32_t)zfr->mtime));
}
req = vdc->req;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
RFC2616_Weaken_Etag(req->resp);
if (req->resp_len != 0)
req->resp_len = -1;
......
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