Fix for bug #300506 and #300207. Incompatible cache formats between gromit and mozilla were causing the crash/asserts. Cleaning your cache before using this should fix everything.

This commit is contained in:
gagan%netscape.com 1998-07-16 03:33:34 +00:00
Родитель 007ea3d8b5
Коммит 0f6f28717e
2 изменённых файлов: 11 добавлений и 4 удалений

6
network/cache/extcache.c поставляемый
Просмотреть файл

@ -318,7 +318,7 @@ total_size += old_obj->string ? PL_strlen(old_obj->string)+1 : 0
STUFF_BOOL(is_relative_path);
HG98379
STUFF_NUMBER(security_on);
#ifndef EXT_DB_ROUTINES
HG42539
@ -338,7 +338,7 @@ total_size += old_obj->string ? PL_strlen(old_obj->string)+1 : 0
cur_ptr = cur_ptr + sizeof(int32);
}
STUFF_NUMBER(method);
STUFF_NUMBER(method);
#ifdef STORE_ADDRESS_AND_POST_DATA
@ -502,7 +502,7 @@ net_DBDataToCacheStruct(DBT * db_obj)
RETRIEVE_BOOL(is_relative_path);
HG72761
HG72761
RETRIEVE_NUMBER(method);

9
network/cache/mkcache.c поставляемый
Просмотреть файл

@ -2597,7 +2597,14 @@ NET_FindURLInCache(URL_Struct * URL_s, MWContext *ctxt)
if(URL_s->content_length != URL_s->real_content_length
&& !found_cache_obj->incomplete_file)
{
PR_ASSERT(0);
/* TODO later- switch back to a PR_ASSERT(0) */
if (1)
{
char *buf = 0;
StrAllocCopy(buf,"Possible Gromit vs. Mozilla cache corruption!\nDid you forget to clean your cache?\nIf you see this error AFTER cleaning your cache then call me- Gagan(x2187)");
FE_Alert(ctxt, buf);
PR_Free(buf);
}
URL_s->real_content_length = 0;
URL_s->content_length = 0;