> Hello all,
> I have a perl script that I am using to write a cookie:
> 
> 
> What I want to know is the a way of setting more than 1 domain ??? ie:
> -domain=>'.mydomain.com, .mydomain2.com' for example ???

Nope -- the underlying HTTP specification allows for only one domain.

At this point, it would behoove you to dump all of the headers for
each inbound request into a log file somewhere, and all the headers
for each outbound response as well, to see where the problem lies: Are
you offering correctly formatted cookies in the appropriate part of
the header?  Is the client not OFFERING the cookies, or are you
failing to select them correctly from the environment.

The simple expedient of adding:

warn $query->http('HTTP_COOKIE'); 

(assuming your CGI object is called $query) 

will give you a list of all the cookies that have been offered by the
browser.  That should help you in tracking down problems.

I would also speculate (wildly) that a cookie header in a frame
document inside a frameset may take a divergent path in different
clients, leading to hair-rending bugs of the form "It seems to work on
explodobrowser 1.77 but fails miserably on versions 1.52 or 2.09"  (I
tested using Firefox 1.0 and it worked fine .. YMMV) 

Finally, totally unrelated to platform, you're going to (sooner or
later) hit cookie-paranoia amongst your users -- there are a lot of
tinfoil-hat people stuck in 1999.  Have you considered some OTHER
technique for maintaining a session identifier.  

With Apache and mod_perl, it is rather easy (There's a considerable
amount of example in the Apache book) to embed a state variable in the
URL (I elected to put mine near the root).  Another kettle of fish
altogether.  (The only reason I bring this up:  You're going to spend
a lot of effort to debug your cookie problem, perhaps to find later
that some large segement of your population doesn't permit cookies).

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
        Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer  software  consists of  only  two  components: ones  and
zeros, in roughly equal proportions.   All that is required is to
sort them into the correct order.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to