W3C home > Mailing lists > Public > www-lib@w3.org > October to December 2001

HTCookie problem(s)

From: Maarten <m.v.kampen@phys.tue.nl>
Date: Mon, 10 Dec 2001 14:39:27 +0100
Message-ID: <3C14BB0F.1030607@phys.tue.nl>
To: www-lib@w3.org
Hi,

I am having two problems with HTCookie:

1) When trying to access 'http://ojps.aip.org' the server sets a cookie 
'cookon=true' and refers me     (302) a '.jsp' page which actually tests 
if the cookie 'cookon' is set. If not, an error-page is displayed. 
However, WWWLib does not process 'SetCookie' before accessing the '.jsp' 
page and thus I end up with a 'Cookies not enabled' page.

2) Not really a bug. A site ( 
http://www4.ncbi.nlm.nih.gov/PubMed/medline.html ) uses cookies
    containing '='. When retreiving a cookie from the cookielist (in a 
'cookie=value;' format)
    the list is searched, breaking at every occurance of '=' or ';'. 
Thus, 'acookie=abc=de;' gives
    the name/value pair 'acookie'/'abc'. It gets worse for the next 
cookies in the list... I don't think
    that an '=' belongs in a cookie so its no bug, but it can be fixed 
by specifically breaking on a ';'
    when retrieving the 'value' part.

But, how to solve problem nr. 1?

Maarten van Kampen
     
Received on Monday, 10 December 2001 08:39:38 GMT

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