Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: CGI::Cookie problem in FF and IE

by Errto (Vicar)
on Aug 07, 2007 at 03:16 UTC ( #630944=note: print w/ replies, xml ) Need Help??


in reply to Re: CGI::Cookie problem in FF and IE
in thread CGI::Cookie problem in FF and IE

Hello proceng,

Welcome to the Monastery. I took a look at your code and I notice that actually the complete version you posted is quite different from the smaller section you posted in your original question, so I'll try to respond to both.

As for your original question, my best guess as to why the cookie is not appearing comes from using the Unix command date to generate your query value. This string will have a newline on the end of it which may confuse your browser. One way to handle this, if that's really the value you want to use, is

my $value = `date`; chomp $value;

However, in the larger update you posted, the code appears to be working correctly. The code generates a cookie called "User-Name" and that is indeed what the browser shows.


Comment on Re^2: CGI::Cookie problem in FF and IE
Select or Download Code
Re^3: CGI::Cookie problem in FF and IE
by proceng (Scribe) on Aug 07, 2007 at 14:10 UTC
    The problem that I have seen (the date command was simply to create changed data on each iteration w/o changing the code) is that the cookie does not show up in the "show cookies" list and is not retrieved in either FF or IE. With your suggestion, the newline is not transferred, but the cookie still is not set in FF even though it is sent as shown in the HTTP header.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://630944]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-09-20 03:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (152 votes), past polls