Handling Client-Side Cookies [Was: Handling Client-Side Redirection]

Dear Mr. Edison Aspert,

        Here, I am going to try to respond to your latest series of requests 
for Jigsaw help.

1.)	Try using the DebugFilter (it is installed just like AuthFilter and 
CookieFilter), it automatically prints out all the Request and Reply headers 
(this way one does not have to mess around with a bunch of 
"System.out.printThis or That ..." commands).

2.)	It looks like you are now exclusively having problems in the realm of 
"Handling Client-Side Cookies."  So, I suggest that you look at a recent 
thread in this user group titled "Handling Client-Side Cookies" 
(http://lists.w3.org/Archives/Public/www-jigsaw/2000NovDec/thread.html).  
Briefly, I think there are some problems in the Cookie-Filter source code 
that are possible to work around.  I believe that adding two lines to the 
source code of the DomainTree class (within the CookieFilter.java file) like 
so:

class DomainTree {

    public HttpCookieList getCookies(URL url) {
	String domain   = url.getHost();
	String path     = url.getFile();
	String parts [] = domainParts(domain);
	if (parts == null) //FIXME Exception
	    return null;

	>>>parts[0] = "root";<<<

	Vector V = new Vector(5);
	int i = 0;
	DomainNode node = null;
	Hashtable childs = nodes;
	if (isIp(domain)) {


~~~~~~~~~ more code ~~~~~~~~~~

    public void insertCookie(HttpSetCookie cookie) {
	String domain  = cookie.getDomain();
	String parts[] = domainParts(domain);
	if (parts == null) //FIXME Exception
	    return;

	>>>parts[0] = "root";<<<

	int i = 0;
	DomainNode node = null;
	Hashtable childs = nodes;
	if (isIp(domain)) {

~~~~~~~~~ more code ~~~~~~~~~~


... can help make the CookieFilter work for you.  However, you may have to 
replace "root" parts[0], with a more complete description of your host, such 
as parts[0] = "www", part[1] = "foo" for some URL http://www.foo.bar.com 
(then parts[2] should = "bar" and parts[3] should "= com").  This leads to 
issues of "tail matching," see "Handling Client-Side Cookies."

	I hope this helps.


	Truly yours,
	John Philip Anderson


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Received on Tuesday, 19 December 2000 08:22:09 UTC