Re: trapping set-cookie with SSL

	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 UTC