/*
- * $Id: HttpHeader.cc,v 1.60 1999/01/22 19:06:58 glenn Exp $
+ * $Id: HttpHeader.cc,v 1.61 1999/01/24 02:26:19 wessels Exp $
*
* DEBUG: section 55 HTTP Header
* AUTHOR: Alex Rousskov
assert(8 * sizeof(HttpHeaderMask) >= HDR_ENUM_END);
/* all headers must be described */
assert(countof(HeadersAttrs) == HDR_ENUM_END);
- if(!Headers)
- Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END);
+ if (!Headers)
+ Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END);
/* create masks */
httpHeaderMaskInit(&ListHeadersMask, 0);
httpHeaderCalcMask(&ListHeadersMask, (const int *) ListHeadersArr, countof(ListHeadersArr));
{
int i;
for (i = 0; i < end; ++i) {
- if (name_len >= 0 && name_len != strLen(info[i].name))
- continue;
- if (!strncasecmp(name, strBuf(info[i].name),
- name_len < 0 ? strLen(info[i].name) + 1 : name_len))
- return i;
+ if (name_len >= 0 && name_len != strLen(info[i].name))
+ continue;
+ if (!strncasecmp(name, strBuf(info[i].name),
+ name_len < 0 ? strLen(info[i].name) + 1 : name_len))
+ return i;
}
return -1;
}
int
httpHeaderIdByNameDef(const char *name, int name_len)
{
- if (!Headers)
- Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END);
- return httpHeaderIdByName(name, name_len, Headers, HDR_ENUM_END);
+ if (!Headers)
+ Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END);
+ return httpHeaderIdByName(name, name_len, Headers, HDR_ENUM_END);
}
-
+
/*
- * $Id: HttpHeaderTools.cc,v 1.23 1999/01/22 19:06:59 glenn Exp $
+ * $Id: HttpHeaderTools.cc,v 1.24 1999/01/24 02:26:20 wessels Exp $
*
* DEBUG: section 66 HTTP Header Tools
* AUTHOR: Alex Rousskov
/*
- * $Id: cache_cf.cc,v 1.320 1999/01/22 19:07:02 glenn Exp $
+ * $Id: cache_cf.cc,v 1.321 1999/01/24 02:26:21 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
static OBJH dump_config;
static void dump_http_header(StoreEntry * entry, const char *name, HttpHeaderMask header);
static void parse_http_header(HttpHeaderMask * header);
-static void free_http_header(HttpHeaderMask *header);
+static void free_http_header(HttpHeaderMask * header);
static void
self_destruct(void)
static void
dump_http_header(StoreEntry * entry, const char *name, HttpHeaderMask header)
-{
+{
storeAppendPrintf(entry, "%s\n", name);
}
-
+
static void
parse_http_header(HttpHeaderMask * header)
{
return;
}
- if(!http_header_first){
+ if (!http_header_first) {
http_header_first = 1;
if (allowed)
httpHeaderMaskInit(header, 0xFF);
}
-
while ((t = strtok(NULL, w_space))) {
if ((id = httpHeaderIdByNameDef(t, strlen(t))) == -1)
id = HDR_OTHER;
CBIT_SET(*header, id);
}
}
-
+
static void
-free_http_header(HttpHeaderMask *header)
-{
+free_http_header(HttpHeaderMask * header)
+{
httpHeaderMaskInit(header, 0);
}
+
/*
- * $Id: client.cc,v 1.80 1999/01/12 23:38:36 wessels Exp $
+ * $Id: client.cc,v 1.81 1999/01/24 02:26:22 wessels Exp $
*
* DEBUG: section 0 WWW Client
* AUTHOR: Harvest Derived
/*
- * $Id: ftp.cc,v 1.277 1999/01/22 04:29:01 wessels Exp $
+ * $Id: ftp.cc,v 1.278 1999/01/24 02:26:23 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
FtpStateData *ftpState = data;
StoreEntry *entry = ftpState->entry;
debug(9, 4) ("ftpTimeout: FD %d: '%s'\n", fd, storeUrl(entry));
- if (entry->store_status == STORE_PENDING) {
- if (entry->mem_obj->inmem_hi == 0) {
- fwdFail(ftpState->fwd,
- errorCon(ERR_READ_TIMEOUT, HTTP_GATEWAY_TIMEOUT));
- }
- }
+ if (entry->store_status == STORE_PENDING) {
+ if (entry->mem_obj->inmem_hi == 0) {
+ fwdFail(ftpState->fwd,
+ errorCon(ERR_READ_TIMEOUT, HTTP_GATEWAY_TIMEOUT));
+ }
+ }
if (ftpState->data.fd > -1) {
comm_close(ftpState->data.fd);
ftpState->data.fd = -1;
if (ftpState->restarted_offset) {
/* Partial reply */
HttpHdrRangeSpec range_spec;
- range_spec.offset = ftpState->restarted_offset;
+ range_spec.offset = ftpState->restarted_offset;
range_spec.length = ftpState->size - ftpState->restarted_offset;
httpReplySetHeaders(reply, 1.0, HTTP_PARTIAL_CONTENT, "Gatewaying",
mime_type, ftpState->size - ftpState->restarted_offset, ftpState->mdtm, -2);
/*
- * $Id: gopher.cc,v 1.148 1999/01/20 19:27:11 wessels Exp $
+ * $Id: gopher.cc,v 1.149 1999/01/24 02:26:24 wessels Exp $
*
* DEBUG: section 10 Gopher
* AUTHOR: Harvest Derived
GopherStateData *gopherState = data;
StoreEntry *entry = gopherState->entry;
debug(10, 4) ("gopherTimeout: FD %d: '%s'\n", fd, storeUrl(entry));
- if (entry->store_status == STORE_PENDING) {
- if (entry->mem_obj->inmem_hi == 0) {
- fwdFail(gopherState->fwdState,
- errorCon(ERR_READ_TIMEOUT, HTTP_GATEWAY_TIMEOUT));
- }
- }
+ if (entry->store_status == STORE_PENDING) {
+ if (entry->mem_obj->inmem_hi == 0) {
+ fwdFail(gopherState->fwdState,
+ errorCon(ERR_READ_TIMEOUT, HTTP_GATEWAY_TIMEOUT));
+ }
+ }
comm_close(fd);
}
/*
- * $Id: store_rebuild.cc,v 1.55 1999/01/21 21:10:37 wessels Exp $
+ * $Id: store_rebuild.cc,v 1.56 1999/01/24 02:26:25 wessels Exp $
*
* DEBUG: section 20 Store Rebuild Routines
* AUTHOR: Duane Wessels
continue;
}
file_close(fd);
- store_open_disk_fd--;
+ store_open_disk_fd--;
fd = -1;
swap_hdr_len = 0;
#if USE_TRUNCATE_NOT_UNLINK
-
/*
- * $Id: structs.h,v 1.269 1999/01/24 02:22:59 wessels Exp $
+ * $Id: structs.h,v 1.270 1999/01/24 02:26:26 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
/*
- * $Id: wais.cc,v 1.130 1999/01/20 19:27:12 wessels Exp $
+ * $Id: wais.cc,v 1.131 1999/01/24 02:26:26 wessels Exp $
*
* DEBUG: section 24 WAIS Relay
* AUTHOR: Harvest Derived
WaisStateData *waisState = data;
StoreEntry *entry = waisState->entry;
debug(24, 4) ("waisTimeout: FD %d: '%s'\n", fd, storeUrl(entry));
- if (entry->store_status == STORE_PENDING) {
- if (entry->mem_obj->inmem_hi == 0) {
- fwdFail(waisState->fwd,
- errorCon(ERR_READ_TIMEOUT, HTTP_GATEWAY_TIMEOUT));
- }
- }
+ if (entry->store_status == STORE_PENDING) {
+ if (entry->mem_obj->inmem_hi == 0) {
+ fwdFail(waisState->fwd,
+ errorCon(ERR_READ_TIMEOUT, HTTP_GATEWAY_TIMEOUT));
+ }
+ }
comm_close(fd);
}