version 1.53, 1997/02/04 16:04:45
|
version 1.54, 1997/02/06 16:33:55
|
Line 465 int main (int argc, char ** argv)
|
Line 465 int main (int argc, char ** argv)
|
int arg; |
int arg; |
BOOL cache = NO; /* Use persistent cache */ |
BOOL cache = NO; /* Use persistent cache */ |
BOOL flush = NO; /* flush the persistent cache */ |
BOOL flush = NO; /* flush the persistent cache */ |
|
char * cache_root = NULL; |
HTChunk * keywords = NULL; /* From command line */ |
HTChunk * keywords = NULL; /* From command line */ |
int keycnt = 0; |
int keycnt = 0; |
Robot * mr = NULL; |
Robot * mr = NULL; |
Line 534 int main (int argc, char ** argv)
|
Line 535 int main (int argc, char ** argv)
|
atoi(argv[++arg]) : DEFAULT_TIMEOUT; |
atoi(argv[++arg]) : DEFAULT_TIMEOUT; |
if (timeout > 0) mr->timer = timeout; |
if (timeout > 0) mr->timer = timeout; |
|
|
|
/* Force no pipelined requests */ |
|
} else if (!strcmp(argv[arg], "-nopipe")) { |
|
HTTP_setConnectionMode(HTTP_NO_PIPELINING); |
|
|
/* Start the persistent cache */ |
/* Start the persistent cache */ |
} else if (!strcmp(argv[arg], "-cache")) { |
} else if (!strcmp(argv[arg], "-cache")) { |
cache = YES; |
cache = YES; |
|
|
/* Force no pipelined requests */ |
/* Determine the cache root */ |
} else if (!strcmp(argv[arg], "-nopipe")) { |
} else if (!strcmp(argv[arg], "-cacheroot")) { |
HTTP_setConnectionMode(HTTP_NO_PIPELINING); |
cache_root = (arg+1 < argc && *argv[arg+1] != '-') ? |
|
argv[++arg] : NULL; |
|
|
/* Stream write flush delay in ms */ |
/* Stream write flush delay in ms */ |
} else if (!strcmp(argv[arg], "-delay")) { |
} else if (!strcmp(argv[arg], "-delay")) { |
Line 652 int main (int argc, char ** argv)
|
Line 658 int main (int argc, char ** argv)
|
|
|
/* Should we use persistent cache? */ |
/* Should we use persistent cache? */ |
if (cache) { |
if (cache) { |
HTCacheInit(NULL, 20); |
HTCacheInit(cache_root, 20); |
HTNet_addBefore(HTCacheFilter, "http://*", NULL, HT_FILTER_MIDDLE); |
HTNet_addBefore(HTCacheFilter, "http://*", NULL, HT_FILTER_MIDDLE); |
HTNet_addAfter(HTCacheUpdateFilter, "http://*", NULL, |
HTNet_addAfter(HTCacheUpdateFilter, "http://*", NULL, |
HT_NOT_MODIFIED, HT_FILTER_MIDDLE); |
HT_NOT_MODIFIED, HT_FILTER_MIDDLE); |