in reply to Sending Cookies from localhost with perl
Don't use domain? It's not required by RFC 2965 and the domain you supply is certainly not a valid one. As far as I know, localhost doesn't have a proper domain name.
Apache2::Cookie says to see also CGI::Cookie which says
Domain names must contain at least two periods to prevent attempts to match on top level domains like ".edu". If no domain is specified, then the browser will only return the cookie to servers on the host the cookie originated from.I also noticed a comment in the CGI::Cookie source which says
So I'm guessing that the root of your problem is an IE bug and that using a space as a domain name seems to work. Please be aware that this is a very specific kludge to a very specific problem (IE and localhost). I'm no expert on cookies but my reading of the RFC makes me think the proper value to use is .local, but I haven't tried it.# IE requires the path and domain to be present for some reason. $path ||= "/"; # however, this breaks networks which use host tables without fully qu +alified # names, so we comment it out. # $domain = CGI::virtual_host() unless defined $domain;
Update: Fixed the RFC number.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sending Cookies from localhost with perl
by martell (Hermit) on May 17, 2010 at 19:12 UTC | |
by rowdog (Curate) on May 18, 2010 at 14:16 UTC | |
by martell (Hermit) on May 19, 2010 at 21:27 UTC |