/*
- * $Id: HttpHeader.cc,v 1.135 2007/09/21 11:41:52 amosjeffries Exp $
+ * $Id: HttpHeader.cc,v 1.136 2007/09/28 00:22:37 hno Exp $
*
* DEBUG: section 55 HTTP Header
* AUTHOR: Alex Rousskov
if (e->id == HDR_CONTENT_LENGTH && (e2 = findEntry(e->id)) != NULL) {
if (e->value.cmp(e2->value.buf()) != 0) {
- ssize_t l1, l2;
+ int64_t l1, l2;
debugs(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2,
"WARNING: found two conflicting content-length headers in {" << getStringPrefix(header_start, header_end) << "}");
goto reset;
}
- if (!httpHeaderParseSize(e->value.buf(), &l1)) {
+ if (!httpHeaderParseOffset(e->value.buf(), &l1)) {
debugs(55, 1, "WARNING: Unparseable content-length '" << e->value.buf() << "'");
delete e;
continue;
- } else if (!httpHeaderParseSize(e2->value.buf(), &l2)) {
+ } else if (!httpHeaderParseOffset(e2->value.buf(), &l2)) {
debugs(55, 1, "WARNING: Unparseable content-length '" << e2->value.buf() << "'");
delById(e2->id);
} else if (l1 > l2) {
/*
- * $Id: HttpHeaderTools.cc,v 1.62 2007/08/13 17:20:51 hno Exp $
+ * $Id: HttpHeaderTools.cc,v 1.63 2007/09/28 00:22:37 hno Exp $
*
* DEBUG: section 66 HTTP Header Tools
* AUTHOR: Alex Rousskov
return 1;
}
-int
-httpHeaderParseSize(const char *start, ssize_t * value)
-{
- int v;
- const int res = httpHeaderParseInt(start, &v);
- assert(value);
- *value = res ? v : 0;
- return res;
-}
-
int
httpHeaderParseOffset(const char *start, int64_t * value)
{
/*
- * $Id: Store.h,v 1.36 2007/08/13 17:20:51 hno Exp $
+ * $Id: Store.h,v 1.37 2007/09/28 00:22:37 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
SQUIDCEXTERN void storeAppendPrintf();
#endif
SQUIDCEXTERN void storeAppendVPrintf(StoreEntry *, const char *, va_list ap);
-SQUIDCEXTERN ssize_t objectLen(const StoreEntry * e);
SQUIDCEXTERN int storeTooManyDiskFilesOpen(void);
SQUIDCEXTERN void storeHeapPositionUpdate(StoreEntry *, SwapDir *);
SQUIDCEXTERN void storeSwapFileNumberSet(StoreEntry * e, sfileno filn);
/*
- * $Id: SwapDir.h,v 1.14 2007/08/13 17:20:51 hno Exp $
+ * $Id: SwapDir.h,v 1.15 2007/09/28 00:22:37 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
virtual void updateSize(int64_t size, int sign);
/* migrated from store_dir.cc */
- bool objectSizeIsAcceptable(ssize_t objsize) const;
+ bool objectSizeIsAcceptable(int64_t objsize) const;
protected:
void parseOptions(int reconfiguring);
/*
- * $Id: cache_cf.cc,v 1.520 2007/09/01 05:56:37 amosjeffries Exp $
+ * $Id: cache_cf.cc,v 1.521 2007/09/28 00:22:37 hno Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
storeAppendPrintf(entry, "%s %d %s\n", name, (int) var, B_BYTES_STR);
}
+#if UNUSED_CODE
static void
dump_kb_size_t(StoreEntry * entry, const char *name, size_t var)
{
storeAppendPrintf(entry, "%s %d %s\n", name, (int) var, B_KBYTES_STR);
}
+#endif
static void
dump_b_int64_t(StoreEntry * entry, const char *name, int64_t var)
parseBytesLine(var, B_BYTES_STR);
}
+#if UNUSED_CODE
static void
parse_kb_size_t(size_t * var)
{
parseBytesLine(var, B_KBYTES_STR);
}
+#endif
static void
parse_b_int64_t(int64_t * var)
#
-# $Id: cf.data.pre,v 1.474 2007/09/27 16:15:23 rousskov Exp $
+# $Id: cf.data.pre,v 1.475 2007/09/28 00:22:37 hno Exp $
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
# ----------------------------------------------------------
NAME: store_avg_object_size
COMMENT: (kbytes)
-TYPE: kb_size_t
+TYPE: kb_int64_t
DEFAULT: 13 KB
LOC: Config.Store.avgObjectSize
DOC_START
/*
- * $Id: client_side.cc,v 1.766 2007/09/23 09:18:10 serassio Exp $
+ * $Id: client_side.cc,v 1.767 2007/09/28 00:22:38 hno Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
ConnStateData::Pointer conn = http->getConn();
if (conn != NULL) {
- if (const ssize_t expecting = conn->bodySizeLeft()) {
+ if (const int64_t expecting = conn->bodySizeLeft()) {
debugs(33, 5, HERE << "ClientSocketContext::initiateClose: " <<
"closing, but first " << conn << " needs to read " <<
expecting << " request body bytes with " <<
*/
if (fd_table[fd].flags.socket_eof) {
- if ((ssize_t) conn->in.notYetUsed < conn->bodySizeLeft()) {
+ if ((int64_t)conn->in.notYetUsed < conn->bodySizeLeft()) {
/* Partial request received. Abort client connection! */
debugs(33, 3, "clientAfterReadingRequests: FD " << fd << " aborted, partial request");
comm_close(fd);
* Report on the number of bytes of body content that we
* know are yet to be read on this connection.
*/
-ssize_t
+int64_t
ConnStateData::bodySizeLeft()
{
// XXX: this logic will not work for chunked requests with unknown sizes
BodyPipe::Pointer
-ConnStateData::expectRequestBody(size_t size)
+ConnStateData::expectRequestBody(int64_t size)
{
bodyPipe = new BodyPipe(this);
bodyPipe->setBodySize(size);
/*
- * $Id: client_side.h,v 1.24 2007/08/27 12:50:42 hno Exp $
+ * $Id: client_side.h,v 1.25 2007/09/28 00:22:38 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
size_t allocatedSize;
} in;
- ssize_t bodySizeLeft();
+ int64_t bodySizeLeft();
/*
* Is this connection based authentication? if so what type it
bool closing() const;
void startClosing(const char *reason);
- BodyPipe::Pointer expectRequestBody(size_t size);
+ BodyPipe::Pointer expectRequestBody(int64_t size);
virtual void noteMoreBodySpaceAvailable(BodyPipe &);
virtual void noteBodyConsumerAborted(BodyPipe &);
/*
- * $Id: protos.h,v 1.549 2007/09/25 13:24:59 hno Exp $
+ * $Id: protos.h,v 1.550 2007/09/28 00:22:38 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
SQUIDCEXTERN int strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos);
SQUIDCEXTERN const char *getStringPrefix(const char *str, const char *end);
SQUIDCEXTERN int httpHeaderParseInt(const char *start, int *val);
-SQUIDCEXTERN int httpHeaderParseSize(const char *start, ssize_t * sz);
SQUIDCEXTERN int httpHeaderParseOffset(const char *start, int64_t * off);
#if STDC_HEADERS
SQUIDCEXTERN void
/*
- * $Id: store_dir.cc,v 1.162 2007/08/13 17:20:51 hno Exp $
+ * $Id: store_dir.cc,v 1.163 2007/09/28 00:22:38 hno Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
* ie any-sized-object swapdirs. This is a good thing.
*/
bool
-SwapDir::objectSizeIsAcceptable(ssize_t objsize) const
+SwapDir::objectSizeIsAcceptable(int64_t objsize) const
{
/*
* If the swapdir's max_obj_size is -1, then it definitely can
/*
- * $Id: structs.h,v 1.564 2007/09/21 15:16:42 hno Exp $
+ * $Id: structs.h,v 1.565 2007/09/28 00:22:38 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
struct
{
int objectsPerBucket;
- size_t avgObjectSize;
+ int64_t avgObjectSize;
int64_t maxObjectSize;
int64_t minObjectSize;
size_t maxInMemObjSize;