On Monday 17 December 2001 21:11, you wrote:
> >It seems _cookie_jar is never properly defined (it's only set to 0 at
> > the
> >
> >top). What is the state of cookie support? I assume this crash is a
> > known problem? Is this easy to fix? If so, I might try...
>
> Fixed. Thanx!!! :-)
Hi Gabriele,
thanks for your fix! The crash is gone, but it doesn't seem to work yet.
Using the attached test case, htdig never reaches cookie3.pl. With a
cookie-enabled browser, cookie3.pl can be reached, a browser with cookies
disbaled only reaches cookie2.pl (start surfing at start.pl).
You can test this by copying the files to your cgi-bin and adapt at least
the "domain" in start.pl
Regards
Daniel
--
http://www.danielnaber.de
#!/usr/bin/perl
print "Content-Type: text/html\n";
print "\n";
print <<__EOF;
hello there! findme!
__EOF
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
use strict;
use CGI qw/:standard/;
use CGI::Cookie;
my $CGIquery = CGI::new();
my $retreived_cookie = cookie('bla');
if( $retreived_cookie ) {
print "cookie content: $retreived_cookie<br>\n";
print "<a href=\"cookie2.pl\">go on</a>";
} else {
print "no cookie\n";
}
#!/usr/bin/perl
use HTTP::Request::Common qw(POST GET);
use LWP::UserAgent;
print "Content-Type: text/html\n";
print "Set-Cookie: bla=blubb; expires=1000; path=/; domain=.gt.owl.de\n";
print "\n";
print <<__EOF;
<a href="cookie1.pl">go on</a>
__EOF