W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2001

Re: trapping set-cookie with SSL

From: Lin, Xu <Xu.Lin@cognos.com>
Date: Fri, 23 Mar 2001 13:45:09 -0500
Message-ID: <430F887D415DD1118C2700805F31ECF1054D0AAD@sota0005.cognos.com>
To: "'www-lib@w3.org'" <www-lib@w3.org>
	I'd just found out what was wrong with the program.  The
HTCookie_init (in HTCookie.c) only registers callback function for http, but
not for https.  After the following modification I was able to get things
running again:

/*
**  Start and stop the cookie engine
*/
PUBLIC BOOL HTCookie_init (void)
{
    if (!baking_cookies) {

	/* Register the SetCookie header parser */
	HTHeader_addParser("Set-Cookie", NO, HTCookie_parseSetCookie);

	/* Register the cookie before and after filters */
	HTNet_addBefore(HTCookie_beforeFilter, "http://*", NULL,
HT_FILTER_MIDDLE);
	HTNet_addAfter(HTCookie_afterFilter, "http://*", NULL, HT_ALL,
HT_FILTER_MIDDLE);

	/* Added filter to trap https for cookie before and after filters */
	HTNet_addBefore(HTCookie_beforeFilter, "https://*", NULL,
HT_FILTER_MIDDLE);
	HTNet_addAfter(HTCookie_afterFilter, "https://*", NULL, HT_ALL,
HT_FILTER_MIDDLE);

	baking_cookies = YES;
	return YES;
    }
    return NO;
}


UDA Software Engineer
(613) 738-1338 ext. 5448
Lin, Xu
Received on Friday, 23 March 2001 13:45:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:39 GMT