From fea3c95540873a12f098508f712a6520c2cc9c46 Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Wed, 31 Mar 1999 22:38:38 +0000 Subject: [PATCH] Added browsing profile hook under #ifdef. --- network/protocol/http/mkaccess.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/network/protocol/http/mkaccess.c b/network/protocol/http/mkaccess.c index b9fe518412c..57e43b5b115 100644 --- a/network/protocol/http/mkaccess.c +++ b/network/protocol/http/mkaccess.c @@ -1840,6 +1840,32 @@ NET_GetCookie(MWContext * context, char * address) } } +#if defined(MOZ_BRPROF) + /* + * Okay, this is a horrible hack. It looks for a URL with + * 'iiop/BRPROF' in it (our little browsing profile reader), and + * if it finds it, it uploads the browsing profile cookie. + * + * The _real_ way to do this would be to + * + * 1) See if the user has enabled the preference to even allow us + * to send out the cookie to _anyone_. + * + * 2) See if the specific site has asked for and received + * permission to be sent the cookie. + */ + if (PL_strstr(address, "iiop/BRPROF")) { + extern PRBrool BP_GetProfile(char* *aProfileCookie); + char* profile; + if (BP_GetProfile(&profile)) { + if (! first) + StrAllocCat(rv, "; BP="); + StrAllocCat(rv, profile); + PL_strfree(profile); + } + } +#endif + net_unlock_cookie_list(); PR_FREEIF(name); PR_Free(path);