remaining changes from nu_cache.

This commit is contained in:
gagan%netscape.com 1998-09-10 19:57:12 +00:00
Родитель f370908aef
Коммит 00ca1aba73
3 изменённых файлов: 31 добавлений и 7 удалений

Просмотреть файл

@ -106,7 +106,11 @@ LIBRARY_NAME=network
EXTRA_LIBS=
REQUIRES= foo parse jtools java zlib nspr dbm util network js security mimetype ldap imap4url ldapurl net progress
!ifdef NU_CACHE
REQUIRES= foo parse jtools java zlib nspr dbm util network js security mimetype ldap imap4url ldapurl net progress cachelib
!else
REQUIRES= foo parse jtools java zlib nspr dbm util network js security mimetype ldap imap4url ldapurl net progress
!endif
EXPORTS= mkstream.h \
net_xp_file.h \
mkparse.h \
@ -152,6 +156,9 @@ LINCS=-I$(PUBLIC)\jtools \
-I$(PUBLIC)\cnetinit \
-I$(PUBLIC)\mimetype \
-I$(PUBLIC)\network \
!ifdef NU_CACHE
-I$(PUBLIC)\cache \
!endif
-I$(PUBLIC)\ldap \
-I$(PUBLIC)\net \
-I$(PUBLIC)\progress \

Просмотреть файл

@ -994,9 +994,13 @@ NET_HTMLHelpMapToURL(int format_out,
}
memset(obj, 0, sizeof(html_help_map_stream));
if(URL_s->cache_file || URL_s->memory_copy)
obj->file_is_local = TRUE;
#ifdef NU_CACHE
if (URL_s->cache_file || URL_s->cache_object)
obj->file_is_local = TRUE;
#else
if(URL_s->cache_file || URL_s->memory_copy)
obj->file_is_local = TRUE;
#endif
else
obj->file_is_local = NET_IsLocalFileURL(URL_s->address);

Просмотреть файл

@ -63,6 +63,9 @@
#include "pics.h"
#endif
#ifdef NU_CACHE
#include "CacheStubs.h"
#endif
typedef struct {
char *buffer;
@ -1376,12 +1379,17 @@ NET_ParseMimeHeader(FO_Present_Types outputFormat,
found_one = TRUE;
}
else if(!PL_strncasecmp(name,"EXT-CACHE:",10))
{
#ifdef NU_CACHE
{
PR_ASSERT(0);
/* Cool find... somebody uses this? let me know -Gagan */
}
#else
{
#ifdef MOZILLA_CLIENT
char * next_arg = strtok(value, ";");
char * name=0;
char * instructions=0;
found_one = TRUE;
while(next_arg)
@ -1409,6 +1417,7 @@ NET_ParseMimeHeader(FO_Present_Types outputFormat,
PR_ASSERT(0);
#endif /* MOZILLA_CLIENT */
}
#endif /* NU_CACHE */
else if (!PL_strncasecmp(name, "ETAG:",5))
{
/* Weak Validators are skipped for now*/
@ -3505,8 +3514,12 @@ NET_GetURLQuick (URL_Struct * URL_s,
MWContext * context,
Net_GetUrlExitFunc* exit_routine)
{
if (!NET_FindURLInMemCache(URL_s, context) &&
#ifdef NU_CACHE
if (!CacheManager_Contains(URL_s->address))
#else
if (!NET_FindURLInMemCache(URL_s, context) &&
!NET_FindURLInExtCache(URL_s, context))
#endif
{
/* default */
return NET_GetURL(