SquirrelHead has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have the following script which sets a cookie.
#!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser); use strict; use CGI::Cookie; my $c = CGI::Cookie->new(-name => 'mycookie', -value => ['foo','bar'], -secure => 1, -HttpOnly => 1, -expires => '+3M'); print "Set-Cookie: $c\n"; print "Content-Type: text/html\n\n";
Everything works as expected with the exception of the httponly flag which is not being set. I have used Firefox and Chrome to view the headers but neither show as having the httponly flag set.
I have tried every solution I can find including different modules but nothing works for me. Does anyone have experience of using httponly whether successful or not?
Any guidance here will be gratefully accepted. I really could do with some help before I pull out what little hair I have left!
Thanks
SquirrelHead
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Cannot get httponly to work
by Anonymous Monk on Feb 10, 2012 at 08:02 UTC | |
by SquirrelHead (Novice) on Feb 10, 2012 at 08:48 UTC | |
by Anonymous Monk on Feb 10, 2012 at 09:07 UTC | |
by SquirrelHead (Novice) on Feb 10, 2012 at 09:29 UTC | |
by SquirrelHead (Novice) on Feb 10, 2012 at 14:28 UTC | |
Re: Cannot get httponly to work
by Khen1950fx (Canon) on Feb 10, 2012 at 08:09 UTC | |
by SquirrelHead (Novice) on Feb 10, 2012 at 09:02 UTC | |
Re: Cannot get httponly to work
by steve (Deacon) on Oct 24, 2012 at 22:16 UTC |