/*
- * $Id: Store.h,v 1.27 2007/04/17 05:40:18 wessels Exp $
+ * $Id: Store.h,v 1.28 2007/04/17 06:07:50 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
virtual int unlock();
/* increate the memory lock count on the entry */
virtual ssize_t objectLen() const;
+ virtual int contentLen() const;
virtual void lock()
SQUIDCEXTERN int storeCheckCachable(StoreEntry * e);
SQUIDCEXTERN void storeSetPrivateKey(StoreEntry *);
SQUIDCEXTERN ssize_t objectLen(const StoreEntry * e);
-SQUIDCEXTERN int contentLen(const StoreEntry * e);
SQUIDCEXTERN int storeTooManyDiskFilesOpen(void);
SQUIDCEXTERN void storeEntryReset(StoreEntry *);
SQUIDCEXTERN void storeHeapPositionUpdate(StoreEntry *, SwapDir *);
/*
- * $Id: client_side.cc,v 1.747 2007/04/17 05:40:18 wessels Exp $
+ * $Id: client_side.cc,v 1.748 2007/04/17 06:07:50 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
debug(33, 9) ("clientLogRequest: http.code='%d'\n", al.http.code);
if (loggingEntry() && loggingEntry()->mem_obj)
- al.cache.objectSize = contentLen(loggingEntry());
+ al.cache.objectSize = loggingEntry()->contentLen();
al.cache.caddr = getConn().getRaw() != NULL ? getConn()->log_addr : no_addr;
/*
- * $Id: store.cc,v 1.604 2007/04/17 05:40:18 wessels Exp $
+ * $Id: store.cc,v 1.605 2007/04/17 06:07:50 wessels Exp $
*
* DEBUG: section 20 Storage Manager
* AUTHOR: Harvest Derived
}
int
-contentLen(const StoreEntry * e)
+StoreEntry::contentLen() const
{
- assert(e->mem_obj != NULL);
- assert(e->getReply() != NULL);
- return e->objectLen() - e->getReply()->hdr_sz;
-
+ assert(mem_obj != NULL);
+ assert(getReply() != NULL);
+ return objectLen() - getReply()->hdr_sz;
}
HttpReply const *
object_length = getReply()->content_length;
if (object_length < 0)
- object_length = contentLen(this);
+ object_length = contentLen();
if (mod_time > request->ims) {
debug(88, 3) ("--> YES: entry newer than client\n");
/*
- * $Id: store_log.cc,v 1.29 2007/04/13 23:12:31 wessels Exp $
+ * $Id: store_log.cc,v 1.30 2007/04/17 06:07:50 wessels Exp $
*
* DEBUG: section 20 Storage Manager Logging Functions
* AUTHOR: Duane Wessels
(int) reply->expires,
reply->content_type.size() ? reply->content_type.buf() : "unknown",
reply->content_length,
- contentLen(e),
+ e->contentLen(),
RequestMethodStr[mem->method],
mem->log_url);
} else {