Re: New to ModPerl 2

[prev] [thread] [next] [Date index for 2004/11/15]

From: Joe Schaefer
Subject: Re: New to ModPerl 2
Date: 16:18 on 15 Nov 2004
Kurt Hansen <khansen@xxxxxxxxxx.xxx> writes:

[...]

> A few things that caused me more pain than I care to admit:
> 
> 1. Apache::Cookie v2 requires an Apache::RequestRec environment
> variable instead of an Apache::Request variable. Using the latter
> caused a segmentation fault. 

If so, that's really a bug, not a portability issue.  Apache::Request 
objects are derived from Apache::RequestRec, so it should be ok to pass 
them to any Apache::Cookie methods which expect an Apache::RequestRec 
object.

Can you please show us the code which segfaults?

> 3. Expires method works differently between v1 and v2 of
> Apache::Cookie->new. An empty variable for -expires will default to
> "now" in v2 which means the cookie won't be set since it expires
> immediately. In v1,  an empty -expires created a session cookie. To
> get the same behavior in v2, just don't supply an -expires parameter
> in new. 

Interesting.  It looks like CGI::Cookie has the v2 behavior.

  $ perl -MCGI::Cookie -wle '$c = new CGI::Cookie 
                                  -name=>1, -value=>2, -expires=>""; 
  print $c->as_string'
  1=2; path=/; expires=Mon, 15-Nov-2004 16:15:09 GMT


I'm not sure if this is a bug in libapreq2.  Any other opinions
out there?

        -- 
        Joe Schaefer


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

(message missing)

New to ModPerl 2
jonathan vanasco 19:26 on 14 Nov 2004

Re: New to ModPerl 2
Markus Wichitill 19:46 on 14 Nov 2004

Re: New to ModPerl 2
Kurt Hansen 21:05 on 14 Nov 2004

Re: New to ModPerl 2
Joe Schaefer 16:18 on 15 Nov 2004

Re: New to ModPerl 2
jonathan vanasco 05:51 on 16 Nov 2004

Re: New to ModPerl 2
Joe Schaefer 13:31 on 16 Nov 2004

Re: New to ModPerl 2
Kurt Hansen 21:06 on 14 Nov 2004

Re: New to ModPerl 2
Dan Brian 00:04 on 15 Nov 2004

Re: New to ModPerl 2
jonathan vanasco 00:42 on 15 Nov 2004

Re: New to ModPerl 2
jonathan vanasco 00:04 on 15 Nov 2004

Re: New to ModPerl 2
Jonathan Vanasco 16:21 on 16 Nov 2004

Re: New to ModPerl 2
Stef1 17:30 on 16 Nov 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52