Okay, so this isn't exactly a problem with CGI.pm. However, I am giving myself a severe headache trying to battle this problem. I have many thousands of users and countless browser variations. I use cookies to log users into the site and maintain their session. However, I have found that the following code works differently based on the browser:
$cookie_out = $query->cookie( -name=>$cookie_name, -value=>$cookie_val +ue, -expires=>1400m, -path=>'/', + -domain=>$cook +ie_domain);
The above works with Netscape 4.7, Netscape 3x and WebTV. It does not work with MSIE 6.0 (not sure about earlier versions since I can't figure out how to have multiple MSIE versions installed on one box). It does not work with Mozilla. It does not work with Opera. If I remove the -domain=>, it will work eith everything except Netscape 4.7 and WebTV. Further, the following works with everything except WebTV:
print $query->header(-cookie=>$cookie_out, -refresh=>"0; URL=$config{b +aseurl}/?c=TestCookie",); print $query->start_html(-title=>'.'); print $query->end_html;
For this to work with WebTV, I have to substitute the CGI.pm -refresh=> with the following:
print "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=$config{baseurl}/$con +fig{script_filename}?c=TestCookie\">";
I just want this to work for all browsers. I have set up some if/elsif's to accomodate various browsers and build the cookie and cookie page correctly based on what browser/version HTTP::BrowserDetect gets from the user-agent string. However, there are so many variations of user-agent strings and browsers that I still have a lot of users who just can't get cookies to work with us. I'm so fscking frustrated that I'm about two seconds away from bashing my head into the wall. Desperate for help!

In reply to Stupid CGI.PM cookies! by Seumas

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.