Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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.

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://630944]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2017-12-18 22:40 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (500 votes). Check out past polls.