From: wessels <> Date: Wed, 26 May 1999 10:57:46 +0000 (+0000) Subject: Buffer the StoreEntry when building a mime icon object. X-Git-Tag: SQUID_3_0_PRE1~2175 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a9f31179f1007ec8b302de0968de3b801f6cdd1b;p=thirdparty%2Fsquid.git Buffer the StoreEntry when building a mime icon object. Also set the ENTRY_SPECIAL flag before calling storeComplete so that it gets swapped out with the new no-swapout-during-rebuild scheme. --- diff --git a/src/mime.cc b/src/mime.cc index 9dfaec567e..ec3226955c 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -1,6 +1,6 @@ /* - * $Id: mime.cc,v 1.87 1999/05/04 21:58:26 wessels Exp $ + * $Id: mime.cc,v 1.88 1999/05/26 04:57:46 wessels Exp $ * * DEBUG: section 25 MIME Parsing * AUTHOR: Harvest Derived @@ -418,6 +418,7 @@ mimeLoadIconFile(const char *icon) METHOD_GET); assert(e != NULL); storeSetPublicKey(e); + storeBuffer(e); e->mem_obj->request = requestLink(urlParse(METHOD_GET, url)); httpReplyReset(reply = e->mem_obj->reply); httpReplySetHeaders(reply, 1.0, HTTP_OK, NULL, @@ -431,9 +432,10 @@ mimeLoadIconFile(const char *icon) while ((n = read(fd, buf, 4096)) > 0) storeAppend(e, buf, n); file_close(fd); + EBIT_SET(e->flags, ENTRY_SPECIAL); + storeBufferFlush(e); storeComplete(e); storeTimestampsSet(e); - EBIT_SET(e->flags, ENTRY_SPECIAL); debug(25, 3) ("Loaded icon %s\n", url); storeUnlockObject(e); memFree(buf, MEM_4K_BUF);