a LACK of a content-length.
/*
- * $Id: client_side.cc,v 1.159 1997/11/28 08:04:39 wessels Exp $
+ * $Id: client_side.cc,v 1.160 1997/11/29 08:03:17 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
if (entry->lastmod < 0)
return 1;
/* Find size of the object */
- if (mem->reply->content_length)
+ if (mem->reply->content_length >= 0)
object_length = mem->reply->content_length;
else
object_length = entry->object_len - mem->reply->hdr_sz;
HTTPCacheInfo->proto_touchobject(HTTPCacheInfo,
http->request->protocol,
http->out.size);
- if (http->entry->mem_obj->reply->content_length <= 0) {
+ if (http->entry->mem_obj->reply->content_length < 0) {
comm_close(fd);
} else if (EBIT_TEST(http->request->flags, REQ_PROXY_KEEPALIVE)) {
debug(12, 5) ("clientWriteComplete: FD %d Keeping Alive\n", fd);
return 1;
if ((mem = entry->mem_obj) == NULL)
return 0;
- if (mem->reply->content_length == 0)
+ if (mem->reply->content_length < 0)
return 0;
if (http->out.offset >= mem->reply->content_length + mem->reply->hdr_sz)
return 1;
/*
- * $Id: comm.cc,v 1.208 1997/11/28 23:48:07 wessels Exp $
+ * $Id: comm.cc,v 1.209 1997/11/29 08:03:18 wessels Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
commConnectFree(fd, cs);
if (cbdataValid(data))
callback(fd, status, data);
- cbdataUnlock(cs->data);
+ cbdataUnlock(data);
}
static void
/*
- * $Id: http.cc,v 1.223 1997/11/20 17:48:37 wessels Exp $
+ * $Id: http.cc,v 1.224 1997/11/29 08:03:19 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
/*
* If there is no content-length, then we probably can't be persistent
*/
- if (reply->content_length == 0)
+ if (reply->content_length < 0)
return 0;
/*
* If there is a content_length, see if we've got all of it. If so,
/*
- * $Id: store.cc,v 1.350 1997/11/28 23:48:26 wessels Exp $
+ * $Id: store.cc,v 1.351 1997/11/29 08:03:21 wessels Exp $
*
* DEBUG: section 20 Storeage Manager
* AUTHOR: Harvest Derived
mem->reply->date = -2;
mem->reply->expires = -2;
mem->reply->last_modified = -2;
+ mem->reply->content_length = -1;
mem->url = xstrdup(url);
mem->log_url = xstrdup(log_url);
mem->swapout.fd = -1;
debug(20, 5) ("storeEntryValidLength: hdr_sz = %d\n", hdr_sz);
debug(20, 5) ("storeEntryValidLength: content_length = %d\n", content_length);
- if (content_length == 0) {
- debug(20, 5) ("storeEntryValidLength: Zero content length; assume valid; '%s'\n",
+ if (content_length < 0) {
+ debug(20, 5) ("storeEntryValidLength: Unspecified content length: %s\n",
storeKeyText(e->key));
return 1;
}
if (hdr_sz == 0) {
- debug(20, 5) ("storeEntryValidLength: Zero header size; assume valid; '%s'\n",
+ debug(20, 5) ("storeEntryValidLength: Zero header size: %s\n",
storeKeyText(e->key));
return 1;
}