emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tiny changes to url-cookie.el


From: Klaus Straubinger
Subject: Re: tiny changes to url-cookie.el
Date: Mon, 27 Jun 2005 17:01:56 +0200 (CEST)

[url-cookie-retrieve]
> That function does not explain very clearly what it is supposed to do.
> What does the argument PATH mean?

The whole topic is explained in more detail in the document
"http://home.netscape.com/newsref/std/cookie_spec.html"; which
is referenced at the beginning of the file url-cookie.el.

In short, the PATH argument is meant to be the local part of the
internet site because sites maybe want to set and retrieve different
cookies for different parts of their site.

> Could you show me some examples of it? Why is it wrong to add ^?

I thought it would require paths starting from "/" (the site's root)
which could not always be true.

But now I have found the root of the problems I had with cookie
retrieval: The function url-http-create-request which builds the HTTP
request calls url-cookie-generate-header-lines already with the wrong
path - but only when dealing with a proxy. It sets a local variable
like this

         (real-fname (if proxy-obj (url-recreate-url proxy-obj)
                       (url-filename url)))

i.e., if a proxy object is defined, the whole URL is used instead of
only the local part after the host name. The function url-filename
is used to get this part (unfortunately its name does not fit very
well its purpose in this case) and should be applied in the proxy case
as well.

Therefore, I think the two lines above should be replaced by

         (real-fname (url-filename (if proxy-obj proxy-obj url)))

and no change to url-cookie-retrieve should be necessary. Sorry for the
confusion.

-- 
Klaus Straubinger




reply via email to

[Prev in Thread] Current Thread [Next in Thread]