The unified diff between revisions [6676c716..] and [c6f8f7e6..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'src/store_swapmeta.c'

#
#
# patch "src/store_swapmeta.c"
#  from [7d767872403f2adbc507a0fc81661dd161046f53]
#    to [369d3779b78fe2673c4b4bbc83c4b85ba758eeac]
#
============================================================
--- src/store_swapmeta.c	7d767872403f2adbc507a0fc81661dd161046f53
+++ src/store_swapmeta.c	369d3779b78fe2673c4b4bbc83c4b85ba758eeac
@@ -68,6 +68,8 @@ storeSwapMetaBuild(StoreEntry * e)
     tlv **T = &TLV;
     const char *url;
     const char *vary;
+    const squid_off_t objsize = objectLen(e);
+
     assert(e->mem_obj != NULL);
     assert(e->swap_status == SWAPOUT_WRITING);
     url = storeUrl(e);
@@ -79,6 +81,10 @@ storeSwapMetaBuild(StoreEntry * e)
     T = storeSwapTLVAdd(STORE_META_STD_LFS, &e->timestamp, STORE_HDR_METASIZE, T);
 #endif
     T = storeSwapTLVAdd(STORE_META_URL, url, strlen(url) + 1, T);
+    /* XXX this should eventually take the large-file-support stuff into account */
+    if (objsize > -1) {
+        T = storeSwapTLVAdd(STORE_META_OBJSIZE, &objsize, sizeof(objsize), T);
+    }
     vary = e->mem_obj->vary_headers;
     if (vary)
 	T = storeSwapTLVAdd(STORE_META_VARY_HEADERS, vary, strlen(vary) + 1, T);