зеркало из https://github.com/mozilla/gecko-dev.git
added trust labels
This commit is contained in:
Родитель
a747f68910
Коммит
2b6d38fe3c
|
@ -43,6 +43,11 @@ with copyright holders.
|
|||
** BUGS: no code yet; doesn't actually do anything
|
||||
*/
|
||||
|
||||
#if defined(CookieManagement)
|
||||
#define TRUST_LABELS 1
|
||||
#endif
|
||||
|
||||
|
||||
/* Library include files */
|
||||
/* --- BEGIN added by mharmsen@netscape.com on 7/9/97 --- */
|
||||
#include "xp.h"
|
||||
|
@ -605,7 +610,11 @@ static NowIn_t lastRet = NowIn_END;
|
|||
* token = HTChunk_data(pCSParse->token);
|
||||
* }
|
||||
*/
|
||||
#ifdef TRUST_LABELS
|
||||
if(HTChunk_size(pCSParse->token))
|
||||
#else
|
||||
if(HTChunk_data(pCSParse->token))
|
||||
#endif
|
||||
{
|
||||
HTChunk_terminate(pCSParse->token);
|
||||
token = HTChunk_data(pCSParse->token);
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -23,6 +23,10 @@
|
|||
* Home for utility functions and anything else that
|
||||
* doesn't fit elsewhere.
|
||||
*/
|
||||
#if defined(CookieManagement)
|
||||
#define TRUST_LABELS 1
|
||||
#endif
|
||||
|
||||
|
||||
#include "rosetta.h"
|
||||
#include "mkutils.h"
|
||||
|
@ -54,6 +58,12 @@
|
|||
#include "MacBinSupport.h"
|
||||
#endif
|
||||
|
||||
#ifdef TRUST_LABELS
|
||||
#include "mkaccess.h"
|
||||
#include "pics.h"
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
char *buffer;
|
||||
int32 size;
|
||||
|
@ -1519,6 +1529,19 @@ NET_ParseMimeHeader(FO_Present_Types outputFormat,
|
|||
|
||||
if(!PL_strcasecmp(value, "NO-CACHE"))
|
||||
URL_s->dont_cache = TRUE;
|
||||
#ifdef TRUST_LABELS
|
||||
}
|
||||
else if ( IsTrustLabelsEnabled() && !PL_strncasecmp(name,"PICS-LABEL:",11))
|
||||
{
|
||||
/* we are looking for trust labels and a PICS-label was found
|
||||
* Parse the label to see if it is a trust label. If it is a
|
||||
* trust label then it will be added to the TrustList in URL_s.
|
||||
*/
|
||||
PICS_ExtractTrustLabel( URL_s, value );
|
||||
/* Then when we are all done with the header the Set-Cookie fields
|
||||
* will be processed and matched to the trust labels.
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1603,7 +1626,11 @@ NET_ParseMimeHeader(FO_Present_Types outputFormat,
|
|||
break;
|
||||
|
||||
case 'S':
|
||||
#ifdef TRUST_LABELS
|
||||
if( !IsTrustLabelsEnabled() && !PL_strncasecmp(name,"SET-COOKIE:",11))
|
||||
#else
|
||||
if(!PL_strncasecmp(name,"SET-COOKIE:",11))
|
||||
#endif
|
||||
{
|
||||
found_one = TRUE;
|
||||
NET_SetCookieStringFromHttp(outputFormat, URL_s, context, URL_s->address, value);
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
* Designed and implemented by Lou Montulli '94
|
||||
*/
|
||||
|
||||
#if defined(CookieManagement)
|
||||
#define TRUST_LABELS 1
|
||||
#endif
|
||||
|
||||
#include "xp.h"
|
||||
#include "plstr.h"
|
||||
#include "prmem.h"
|
||||
|
@ -52,6 +56,10 @@ IL_Type(const char *buf, int32 len);
|
|||
|
||||
#include "prefapi.h"
|
||||
|
||||
#ifdef TRUST_LABELS
|
||||
extern void ProcessCookiesAndTrustLabels( ActiveEntry *ce );
|
||||
#endif
|
||||
|
||||
/* for XP_GetString() */
|
||||
#include "xpgetstr.h"
|
||||
extern int XP_ALERT_OUTMEMORY;
|
||||
|
@ -1287,6 +1295,9 @@ net_ProcessFile (ActiveEntry * cur_entry)
|
|||
if(con_data->stream)
|
||||
COMPLETE_STREAM;
|
||||
con_data->next_state = NET_FILE_FREE;
|
||||
#ifdef TRUST_LABELS
|
||||
ProcessCookiesAndTrustLabels( cur_entry );
|
||||
#endif
|
||||
break;
|
||||
|
||||
case NET_FILE_ERROR_DONE:
|
||||
|
|
Загрузка…
Ссылка в новой задаче