in reply to Cannot get httponly to work

Note that the httponly option only works on the more recent browsers such as IE6, Firefox3, and Opera9.5. Also, I believe that you are missing your domain and cgi-bin path.
#!/usr/bin/perl use strict; use warnings; use CGI qw/:standard/; use CGI::Cookie; use CGI::Carp qw/fatalsToBrowser/; my $c = CGI::Cookie->new( -name => 'mycookie', -value => ['foo','bar'], -secure => 1, -expires => '+3M', -domain => 'your domain', -path => '/path/to/cgi-bin -httponly => 1, ); print "Set-Cookie: $c\n"; print "Content-Type: text/html\n\n";

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

    Hi

    I've had the domain and path set in the scripts before and taken out during testing. In fact, I have taken out and added back just about every possible permutation :) Adding them back again seems to make no difference.

    Thanks for the reply, I'm investigating the possibility that Apache is not setting the httponly flag at the moment.

    Cheers

    SquirrelHead