in reply to Re^2: Cannot get httponly to work
in thread Cannot get httponly to work

Upgrade CGI

$ pmvers CGI CGI::Cookie CGI: 3.59 CGI::Cookie: 1.30 $ perl -MCGI -le " print CGI->cookie( qw/ -name mycookie /, -value => +[qw/ foo bar /], qw/ -secure 1 -httponly 1 -expires +3M / ) " mycookie=foo&bar; path=/; expires=Thu, 10-May-2012 09:12:33 GMT; secur +e; HttpOnly $ $ perl -MCGI -d:Modlist -le " print CGI->cookie( qw/ -name mycookie /, + -value => [qw/ foo bar /], qw/ -secure 1 -httponly 1 -expires +3M / +) " mycookie=foo&bar; path=/; expires=Thu, 10-May-2012 09:12:39 GMT; secur +e; HttpOnly CGI 3.59 CGI::Cookie 1.30 CGI::Util 3.53 Carp 1.23 Exporter 5.66 constant 1.21 overload 1.13 vars 1.02 warnings 1.12 warnings::register 1.02

Replies are listed 'Best First'.
Re^4: Cannot get httponly to work
by SquirrelHead (Novice) on Feb 10, 2012 at 09:29 UTC

    Hi again

    I have 3.15 and 1.26. Time for an upgrade I think.

    I'll post results after update.

    Thanks

    SquirrelHead

      Hi again,

      I've upgraded CGI and CGI::Cookie to versions 3.59 and 1.3 and running the same code now correctly sets the httponly flag.

      Thank you, you are a lifesaver.

      Cheers

      SquirrelHead