r4044 - in
/packages/libapache-session-wrapper-perl/branches/upstream/current:
Build.PL Changes MANIFEST META.yml SIGNATURE lib/Apache/Session/Wrapper.pm
t/TEST.PL t/apache/basic.t t/conf/extra.conf.in
t/response/TestApache/basic.pm
eloy at users.alioth.debian.org
eloy at users.alioth.debian.org
Fri Oct 6 13:28:19 UTC 2006
Author: eloy
Date: Fri Oct 6 13:28:19 2006
New Revision: 4044
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=4044
Log:
Load /tmp/tmp.lzuli28163/libapache-session-wrapper-perl-0.33 into
packages/libapache-session-wrapper-perl/branches/upstream/current.
Added:
packages/libapache-session-wrapper-perl/branches/upstream/current/t/TEST.PL
Modified:
packages/libapache-session-wrapper-perl/branches/upstream/current/Build.PL
packages/libapache-session-wrapper-perl/branches/upstream/current/Changes
packages/libapache-session-wrapper-perl/branches/upstream/current/MANIFEST
packages/libapache-session-wrapper-perl/branches/upstream/current/META.yml
packages/libapache-session-wrapper-perl/branches/upstream/current/SIGNATURE
packages/libapache-session-wrapper-perl/branches/upstream/current/lib/Apache/Session/Wrapper.pm
packages/libapache-session-wrapper-perl/branches/upstream/current/t/apache/basic.t
packages/libapache-session-wrapper-perl/branches/upstream/current/t/conf/extra.conf.in
packages/libapache-session-wrapper-perl/branches/upstream/current/t/response/TestApache/basic.pm
Modified: packages/libapache-session-wrapper-perl/branches/upstream/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libapache-session-wrapper-perl/branches/upstream/current/Build.PL?rev=4044&op=diff
==============================================================================
--- packages/libapache-session-wrapper-perl/branches/upstream/current/Build.PL (original)
+++ packages/libapache-session-wrapper-perl/branches/upstream/current/Build.PL Fri Oct 6 13:28:19 2006
@@ -23,4 +23,4 @@
);
$build->create_build_script;
-$build->add_to_cleanup( 't/session' );
+$build->add_to_cleanup( qw( t/session t/conf/apreq2.conf t/conf/skip ) );
Modified: packages/libapache-session-wrapper-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libapache-session-wrapper-perl/branches/upstream/current/Changes?rev=4044&op=diff
==============================================================================
--- packages/libapache-session-wrapper-perl/branches/upstream/current/Changes (original)
+++ packages/libapache-session-wrapper-perl/branches/upstream/current/Changes Fri Oct 6 13:28:19 2006
@@ -1,88 +1,115 @@
+0.33 2006-09-26
+
+- When setting up tests with Apache::Test, if the user has apache2 we
+ need to make sure that they have the mod_apreq2.so library
+ available. If they don't, the live tests will be skipped. Based on a
+ patch from Derek Price. RT #21552.
+
+0.32 2006-09-18
+
+- Work around a (maybe) bug in Apache2::Cookie. Set -value to undef to
+ in Apach2::Cookie->new causes it to return undef, rather than a
+ cookie with no value. This meant that delete_session() caused an
+ "attempt to call method of undefined value" error. Reported by Derek
+ Price. RT #20992.
+
+
+0.31 2006-07-11
+
+- Exactly 0.30 but now the Build.PL creates a "traditional"
+ Makefile.PL. This fixes the problem that the generated "passthrough"
+ Makefile.PL was requiring Apache::TestMB, because it's available on
+ my system.
+
+
0.30 2006-07-10
-- Exactly like 0.29 but does not declare a "build_reqiures" dependency
-on Apache::TestMB. Declaring this dependency causes CPAN.pm (and
-probably CPANPLUS) to try and install Apache::Test, which may not
-always install cleanly. If you do have it already installed, then it
-will be used to run the live tests.
+- Exactly like 0.29 but does not declare a "build_requires" dependency
+ on Apache::TestMB. Declaring this dependency causes CPAN.pm (and
+ probably CPANPLUS) to try and install Apache::Test, which may not
+ always install cleanly. If you do have it already installed, then it
+ will be used to run the live tests.
0.29 2006-06-09
- When not running under mod_perl, Apache::Session::Wrapper simply did
-not even try to load CGI::Cookie to generate cookies. Patch by Derek
-Poon.
+ not even try to load CGI::Cookie to generate cookies. Patch by Derek
+ Poon.
- When running under mod_perl 1 without Apache::Request, an exception
-was generated when trying to send a cookie.
+ was generated when trying to send a cookie.
- Apache::Session::Wrapper now only checks for err_headers_out and
-headers_out on the header_object, since this works for both mod_perl 1
-and 2, as well as Mason's FakeApache object.
+ headers_out on the header_object, since this works for both mod_perl
+ 1 and 2, as well as Mason's FakeApache object.
- As of version CGI.pm 3.16, CGI::Cookie has a bake() method, but now
-Apache::Session::Wrapper explicitly will not call it, because if
-you're not running under mod_perl, it ends up calling print() to send
-the cookie header when it is called, which may not be what a user of
-this module wants. Patch by Derek Poon.
+ Apache::Session::Wrapper explicitly will not call it, because if
+ you're not running under mod_perl, it ends up calling print() to
+ send the cookie header when it is called, which may not be what a
+ user of this module wants. Patch by Derek Poon.
0.28 2006-05-23
- Allow a session_id parameter to the constructor, to force the use of
-a particular existing session.
+ a particular existing session.
- Fixed a bug where failing to create a new session was ignored if
-allow_invalid_id was true.
+ allow_invalid_id was true.
- Detect very weird case where tying to tie to Apache::Session
-succeeds but the tied hash has no _session_id key. This now throws an
-exception.
+ succeeds but the tied hash has no _session_id key. This now throws
+ an exception.
- Fixed bug when the header_object ->can('header_out') but this method
-does not return an object, as with HTML::Mason::FakeApache. Reported
-by Hans Dieter.
+ does not return an object, as with HTML::Mason::FakeApache. Reported
+ by Hans Dieter.
- The logic to load an appropriate cookie class if the class was
-already loaded and an exception had previously been thrown by an
-unrelated class.
+ already loaded and an exception had previously been thrown by an
+ unrelated class.
- Added a way to register session subclass via RegisterClass() and
-RegisterFlexClass(), to allow people to use any session subclass they
-want without needing explicit support in Apache::Session::Wrapper.
+ RegisterFlexClass(), to allow people to use any session subclass
+ they want without needing explicit support in
+ Apache::Session::Wrapper.
+
0.27 not released
- This was a version used internally at Socialtext, but never
-released.
+ released.
+
0.26 2005-09-20
- Finally should work properly under both mp1 and mp2. Patches and
-tests by Daisuke Maki.
+ tests by Daisuke Maki.
- No longer depends on Apache::Cookie or Apache2::Cookie, but it will
-use them if it can instead of CGI::Cookie.
+ use them if it can instead of CGI::Cookie.
0.25 2005-08-14
- Silenced a warning that could occur when using session length
-cookies under mod_perl.
+ cookies under mod_perl.
0.24 2005-08-01
- Optional parameters for store modules were not handled properly when
-using Flex as the session class. Added some tests. Reported by Gavin
-Carr.
+ using Flex as the session class. Added some tests. Reported by
+ Gavin Carr.
0.23 2005-07-26
- If two sets of valid parameters for a class shared a parameter, an
-error would be thrown if you used the second set, even if it was
-complete. Reported by Victor Felix.
+ error would be thrown if you used the second set, even if it was
+ complete. Reported by Victor Felix.
0.22 2005-07-18
@@ -93,19 +120,19 @@
0.21 2005-06-20
- The fix for mod_perl2 caused a new cookie to be sent for each
-request under mod_perl 1. I love it!
+ request under mod_perl 1. I love it!
0.20 2005-06-08
- Fix to make getting cookies work under mod_perl2. Reported by
-Baldvin Kovacs.
+ Baldvin Kovacs.
0.19 2005-02-15
- Add support for Apache::RequestRec as header_object by checking
-header_object for err_headers_out and headers_out methods.
+ header_object for err_headers_out and headers_out methods.
0.18 2004-06-30
@@ -116,38 +143,38 @@
0.17 2004-04-23
- Fix a bug in checking parameters which could occur when the "commit"
-parameter for Postgres, Oracle, or Sybcase was passed. This caused a
-fatal error when creating the wrapper object. Patch by Max Baker.
+ parameter for Postgres, Oracle, or Sybcase was passed. This caused
+ a fatal error when creating the wrapper object. Patch by Max Baker.
0.16 2004-04-08
- No code changes, just include Class::Container in the dependencies.
-Reported via CPAN testers.
+ Reported via CPAN testers.
0.15 2004-04-06
- No code changes, just added the SIGNATURE file to the manifest so
-that signature checks don't fail.
+ that signature checks don't fail.
0.14 2004-04-03
- Fix a bug which causes the constructor to complain that some
-required parameters were missing when in fact the required parameters
-had been given. Reported by Jim Mozley.
+ required parameters were missing when in fact the required
+ parameters had been given. Reported by Jim Mozley.
0.13 2004-03-19
- Allow the cookie expiration to be set to "session", which is
-equivalent to undef, and causes the cookie to expire when the browser
-is closed. Requested by Herald (RT #5615) for
-MasonX::Request::WithApacheSession.
+ equivalent to undef, and causes the cookie to expire when the
+ browser is closed. Requested by Herald (RT #5615) for
+ MasonX::Request::WithApacheSession.
- Remove some incorrect default values for some parameters, which were
-being set to undef when they shouldn't be.
+ being set to undef when they shouldn't be.
0.12 2004-02-26
Modified: packages/libapache-session-wrapper-perl/branches/upstream/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libapache-session-wrapper-perl/branches/upstream/current/MANIFEST?rev=4044&op=diff
==============================================================================
--- packages/libapache-session-wrapper-perl/branches/upstream/current/MANIFEST (original)
+++ packages/libapache-session-wrapper-perl/branches/upstream/current/MANIFEST Fri Oct 6 13:28:19 2006
@@ -12,4 +12,5 @@
t/apache/basic.t
t/conf/extra.conf.in
t/response/TestApache/basic.pm
+t/TEST.PL
SIGNATURE Added here by Module::Build
Modified: packages/libapache-session-wrapper-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libapache-session-wrapper-perl/branches/upstream/current/META.yml?rev=4044&op=diff
==============================================================================
--- packages/libapache-session-wrapper-perl/branches/upstream/current/META.yml (original)
+++ packages/libapache-session-wrapper-perl/branches/upstream/current/META.yml Fri Oct 6 13:28:19 2006
@@ -1,6 +1,6 @@
---
name: Apache-Session-Wrapper
-version: 0.31
+version: 0.33
author:
- 'Dave Rolsky, <autarch at urth.org>'
abstract: A simple wrapper around Apache::Session
@@ -20,7 +20,7 @@
provides:
Apache::Session::Wrapper:
file: lib/Apache/Session/Wrapper.pm
- version: 0.31
+ version: 0.33
generated_by: Module::Build version 0.2801
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.2.html
Modified: packages/libapache-session-wrapper-perl/branches/upstream/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libapache-session-wrapper-perl/branches/upstream/current/SIGNATURE?rev=4044&op=diff
==============================================================================
--- packages/libapache-session-wrapper-perl/branches/upstream/current/SIGNATURE (original)
+++ packages/libapache-session-wrapper-perl/branches/upstream/current/SIGNATURE Fri Oct 6 13:28:19 2006
@@ -14,24 +14,25 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 9fc9b3dcd88562dfaa0ad39790100a5315fb9d40 Build.PL
-SHA1 c251238a15a2a97e20daba21f805d0da64635585 Changes
+SHA1 863c6a514a547bcfbdab61bf3bc8fd07db1535c3 Build.PL
+SHA1 5cb7b8b61d3202e61f4f909fda32c24919399c37 Changes
SHA1 f235ba4160673bcb7c9d58c2f09dbc7fc0efadea LICENSE
-SHA1 2469820b4c3f8b03c36f835cac1bf173b21c0da2 MANIFEST
-SHA1 3c8727fc938d366138ce6e10a33beedbcdaaf2cb META.yml
+SHA1 4d184ceee71ce918d464e8b8ec173c0c9ce430ae MANIFEST
+SHA1 26a211d44c0328f11ae84bdcf6e36d1b7f2197da META.yml
SHA1 e13c6f91a330d6057ded680bfb12c067ebaa1c1e Makefile.PL
SHA1 b081931e783c93cb74e2943300e87ff0f0833da4 README
-SHA1 6d46fd4fc6788c675ce07736ba0a4427dda03619 lib/Apache/Session/Wrapper.pm
+SHA1 c0726fd607ede8a0192cf3e0484d1cc1d23ca466 lib/Apache/Session/Wrapper.pm
SHA1 a9822734d9754c39b2fb7798acce8cfd9b9b61d6 t/01-basic.t
SHA1 91754573ee0fce9249ef22f571f34d850304de6a t/02-register.t
SHA1 157c4c93c5a1b2325a244c54aa71f790b7addbe5 t/99-pod.t
-SHA1 8de45ee1314597a798f6de23ee82b6dac93ec353 t/apache/basic.t
-SHA1 c880fdc297c36e5f8ee6a05c1dba800d36134ef7 t/conf/extra.conf.in
-SHA1 a8b942c1a747ffc6a4309efc03f63260d822014b t/response/TestApache/basic.pm
+SHA1 11e74ab5027643aa27b4abe6a04414f1e91d84f8 t/TEST.PL
+SHA1 fdf3ec189d9ef686fc1162aaded3c20f666092fb t/apache/basic.t
+SHA1 456e0e788ff705db632199c3b1dc061466248d36 t/conf/extra.conf.in
+SHA1 c2655e02dfb348757a22180cc0f449e17c460c6f t/response/TestApache/basic.pm
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
-iD8DBQFEs7cK3Or3ZzQuifMRAhqaAJ0SGLfpCBs7OumZdhc4TbsSWAhCkwCg1xBB
-gRQu0ngPbfFoK+jVJBCpibY=
-=XVh8
+iD8DBQFFGTdT3Or3ZzQuifMRAtvNAKCzAoGur7SgoTNwVKoBkLzJfqiYBwCfQIH8
+UGQ+3UduZWnKPwUdom95aeI=
+=o1QG
-----END PGP SIGNATURE-----
Modified: packages/libapache-session-wrapper-perl/branches/upstream/current/lib/Apache/Session/Wrapper.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libapache-session-wrapper-perl/branches/upstream/current/lib/Apache/Session/Wrapper.pm?rev=4044&op=diff
==============================================================================
--- packages/libapache-session-wrapper-perl/branches/upstream/current/lib/Apache/Session/Wrapper.pm (original)
+++ packages/libapache-session-wrapper-perl/branches/upstream/current/lib/Apache/Session/Wrapper.pm Fri Oct 6 13:28:19 2006
@@ -4,7 +4,7 @@
use vars qw($VERSION);
-$VERSION = '0.31';
+$VERSION = '0.33';
use base qw(Class::Container);
@@ -719,7 +719,9 @@
$self->{cookie_class}->new
( @{ $self->{new_cookie_args} },
-name => $self->{cookie_name},
- -value => $self->{session_id},
+ # Apache2::Cookie will return undef if we pass undef for
+ # -value.
+ -value => ( $self->{session_id} || '' ),
( defined $expires
? ( -expires => $expires )
: ()
@@ -1343,4 +1345,13 @@
Dave Rolsky, <autarch at urth.org>
+=head1 COPYRIGHT
+
+Copyright (c) 2003-2006 David Rolsky. All rights reserved. This
+program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+The full text of the license can be found in the LICENSE file included
+with this module.
+
=cut
Added: packages/libapache-session-wrapper-perl/branches/upstream/current/t/TEST.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libapache-session-wrapper-perl/branches/upstream/current/t/TEST.PL?rev=4044&op=file
==============================================================================
--- packages/libapache-session-wrapper-perl/branches/upstream/current/t/TEST.PL (added)
+++ packages/libapache-session-wrapper-perl/branches/upstream/current/t/TEST.PL Fri Oct 6 13:28:19 2006
@@ -1,0 +1,75 @@
+#!perl
+
+use strict;
+use warnings;
+
+
+my $runner = Apache::TestRunPerl::Custom->new()->run(@ARGV);
+
+# The custom module
+package Apache::TestRunPerl::Custom;
+
+use base qw(Apache::TestRunPerl);
+
+use File::Spec;
+use IO::File;
+
+
+sub configure
+{
+ my $self = shift;
+
+ my $conf_file = $self->_conf_file();
+ my $skip_file = File::Spec->catfile( $self->{test_config}{vars}{t_conf}, 'skip' );
+
+ for my $file ( $conf_file, $skip_file )
+ {
+ if ( -f $file )
+ {
+ unlink $file
+ or die "Cannot unlink $file: $!";
+ }
+ }
+
+ $self->SUPER::configure(@_);
+
+ if ( $self->{test_config}{server}{rev} >= 2 )
+ {
+ my $apreq2 = $self->{test_config}->find_apache_module('mod_apreq2.so');
+
+ if ($apreq2)
+ {
+ $self->_write_apreq_conf( "LoadModule apreq_module $apreq2" );
+ }
+ else
+ {
+ $self->_write_apreq_conf('');
+ open my $fh, '>', $skip_file
+ or die "Cannot write to $skip_file: $!";
+ }
+ }
+ else
+ {
+ $self->_write_apreq_conf('');
+ }
+}
+
+sub _conf_file { File::Spec->catfile( $_[0]->{test_config}{vars}{t_conf}, 'apreq2.conf' ) }
+
+sub _write_apreq_conf
+{
+ my $self = shift;
+ my $content = shift;
+
+ my $conf_file = $self->_conf_file();
+
+ open my $fh, '>', $conf_file
+ or die "Cannot write to $conf_file: $!";
+ print $fh $content . "\n"
+ or die "Cannot write to $conf_file: $!";
+ close $fh
+ or die "Cannot write to $conf_file: $!";
+}
+
+
+1;
Modified: packages/libapache-session-wrapper-perl/branches/upstream/current/t/apache/basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libapache-session-wrapper-perl/branches/upstream/current/t/apache/basic.t?rev=4044&op=diff
==============================================================================
--- packages/libapache-session-wrapper-perl/branches/upstream/current/t/apache/basic.t (original)
+++ packages/libapache-session-wrapper-perl/branches/upstream/current/t/apache/basic.t Fri Oct 6 13:28:19 2006
@@ -2,22 +2,47 @@
use strict;
-use Test::More tests => 4;
+use File::Spec;
+use Test::More;
+
+BEGIN
+{
+ my $skip_file = File::Spec->catfile( qw( t conf skip ) );
+
+ if ( -f $skip_file )
+ {
+ plan skip_all => 'You must have the apreq2 module to run these tests with apache2.';
+ }
+ else
+ {
+ plan tests => 6;
+ }
+}
+
use Apache::Test qw(:withtestmore);
use Apache::TestUtil;
use Apache::TestRequest qw(GET);
my $ua = Apache::TestRequest::user_agent( cookie_jar => {} );
-my $res = GET '/TestApache__basic';
-ok( $res->is_success, 'request succeeded' );
-ok( $res->header('set-cookie'), 'response includes cookie' );
-$res->header('set-cookie') =~ m{asw_cookie=([^;]+);};
-my $val1 = $1;
+{
+ my $res = GET '/TestApache__basic';
+ ok( $res->is_success, 'request succeeded' );
+ ok( $res->header('set-cookie'), 'response includes cookie' );
-$res = GET '/TestApache__basic';
-$res->header('set-cookie') =~ m{asw_cookie=([^;]+);};
-my $val2 = $1;
+ my ($cookie_val1) = ( $res->header('set-cookie') =~ m{asw_cookie=([^;]+);} );
-is( $val1, $val2, 'got the same cookie for each request' );
-unlike( $res->content, qr/ERROR/, 'no error message in response' );
+ $res = GET '/TestApache__basic';
+ $res->header('set-cookie') =~ m{asw_cookie=([^;]+);};
+ my ($cookie_val2) = ( $res->header('set-cookie') =~ m{asw_cookie=([^;]+);} );
+
+ is( $cookie_val1, $cookie_val2, 'got the same cookie for each request' );
+ unlike( $res->content, qr/ERROR/, 'no error message in response' );
+}
+
+{
+ my $res = GET '/TestApache__basic?delete=1';
+ like( $res->header('set-cookie'), qr/asw_cookie=(?:;|\z)/,
+ 'no value in cookie when deleting' );
+ unlike( $res->content, qr/ERROR/, 'no error message in response' );
+}
Modified: packages/libapache-session-wrapper-perl/branches/upstream/current/t/conf/extra.conf.in
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libapache-session-wrapper-perl/branches/upstream/current/t/conf/extra.conf.in?rev=4044&op=diff
==============================================================================
--- packages/libapache-session-wrapper-perl/branches/upstream/current/t/conf/extra.conf.in (original)
+++ packages/libapache-session-wrapper-perl/branches/upstream/current/t/conf/extra.conf.in Fri Oct 6 13:28:19 2006
@@ -1,2 +1,5 @@
# This is the location where file-based sessions are stored
-PerlSetVar SessionDir @ServerRoot@/session
+PerlSetVar SessionDir @ServerRoot@/session
+
+# Get the apreq config for ModPerl2.
+Include conf/apreq2.conf
Modified: packages/libapache-session-wrapper-perl/branches/upstream/current/t/response/TestApache/basic.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libapache-session-wrapper-perl/branches/upstream/current/t/response/TestApache/basic.pm?rev=4044&op=diff
==============================================================================
--- packages/libapache-session-wrapper-perl/branches/upstream/current/t/response/TestApache/basic.pm (original)
+++ packages/libapache-session-wrapper-perl/branches/upstream/current/t/response/TestApache/basic.pm Fri Oct 6 13:28:19 2006
@@ -73,6 +73,8 @@
);
$output .= "SESSION: " . $w->session->{_session_id} . "\n";
+
+ $w->delete_session() if $r->param('delete');
};
$output .= "ERROR: $@" if $@;
More information about the Pkg-perl-cvs-commits
mailing list