[Rt-commit] rt branch, 4.0/apache2-fixes, created. rt-4.0.0rc5-7-gcdafa34

Chia-liang Kao clkao at bestpractical.com
Fri Feb 25 05:38:22 EST 2011


The branch, 4.0/apache2-fixes has been created
        at  cdafa34ddf702836964fc9bb577f20237f33108e (commit)

- Log -----------------------------------------------------------------
commit 4d88f274ce83315c463d9b3e1c5b2b45cc5a935f
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Thu Feb 24 01:04:34 2011 +0800

    Use Location instead of Directory as suggested by Plack::Handler::Apache* doc.

diff --git a/docs/web_deployment.pod b/docs/web_deployment.pod
index 91c9871..ba1384f 100644
--- a/docs/web_deployment.pod
+++ b/docs/web_deployment.pod
@@ -68,14 +68,14 @@ it knows where to find RT:
         RedirectMatch permanent (.*)/$ $1/index.html
 
         DocumentRoot "/opt/rt4/share/html"
-        <Directory "/opt/rt4/share/html">
+        <Location />
             Order allow,deny
             Allow from all
 
             SetHandler perl-script
             PerlHandler Plack::Handler::Apache1
             PerlSetVar psgi_app /opt/rt4/sbin/rt-server
-        </Directory>
+        </Location>
     </VirtualHost>
 
 =head3 mod_perl 2.xx
@@ -112,14 +112,14 @@ it knows where to find RT:
         RedirectMatch permanent (.*)/$ $1/index.html
 
         DocumentRoot "/opt/rt4/share/html"
-        <Directory "/opt/rt4/share/html">
+        <Location />
             Order allow,deny
             Allow from all
 
             SetHandler perl-script
             PerlResponseHandler Plack::Handler::Apache2
             PerlSetVar psgi_app /opt/rt4/sbin/rt-server
-        </Directory>
+        </Location>
     <Perl>
         use Plack::Handler::Apache2;
         Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server");
diff --git a/t/data/configs/apache2.2+mod_perl.conf.in b/t/data/configs/apache2.2+mod_perl.conf.in
index a448473..aad8bf5 100644
--- a/t/data/configs/apache2.2+mod_perl.conf.in
+++ b/t/data/configs/apache2.2+mod_perl.conf.in
@@ -46,14 +46,14 @@ AddDefaultCharset UTF-8
 PerlSetEnv RT_SITE_CONFIG %%RT_SITE_CONFIG%%
 
 DocumentRoot "%%DOCUMENT_ROOT%%"
-<Directory "%%DOCUMENT_ROOT%%">
+<Location />
     Order allow,deny
     Allow from all
 
     SetHandler perl-script
     PerlResponseHandler Plack::Handler::Apache2
     PerlSetVar psgi_app %%RT_SBIN_PATH%%/rt-server
-</Directory>
+</Location>
 
 <Perl>
     $ENV{RT_TESTING}=1;

commit 5baa7a23f87d20e5100c820c8ddbe43c3e0401bd
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Thu Feb 24 17:56:39 2011 +0800

    Fix test count.

diff --git a/t/web/cf_datetime.t b/t/web/cf_datetime.t
index f54a246..d92b18d 100644
--- a/t/web/cf_datetime.t
+++ b/t/web/cf_datetime.t
@@ -8,7 +8,7 @@ RT->Config->Set( 'Timezone' => 'EST5EDT' ); # -04:00
 my ($baseurl, $m);
 
 SKIP: {
-    skip 'test with apache+mod_perl has a bug of timezone', 44
+    skip 'test with apache+mod_perl has a bug of timezone', 51
       if $ENV{RT_TEST_WEB_HANDLER}
           && $ENV{RT_TEST_WEB_HANDLER} =~ /apache/
           && $ENV{RT_TEST_WEB_HANDLER} !~ /fastcgi/;

commit 8bb388497b7101c3f1708b718b28f0fcb4be59ee
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Thu Feb 24 17:58:02 2011 +0800

    Require newer Plack for URI containing // to work under apache2.

diff --git a/sbin/rt-test-dependencies.in b/sbin/rt-test-dependencies.in
index 0fa26e1..8ddcfad 100755
--- a/sbin/rt-test-dependencies.in
+++ b/sbin/rt-test-dependencies.in
@@ -238,7 +238,7 @@ $deps{'PSGI'} = [ text_to_hash( << '.') ];
 CGI 3.38
 CGI::PSGI 0.12
 HTML::Mason::PSGIHandler 0.52
-Plack 0.9942
+Plack 0.9971
 Plack::Handler::Starlet
 CGI::Emulate::PSGI
 .

commit fbefa7c59043154642fc1a81c01e7199f0b47bb8
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Thu Feb 24 21:16:11 2011 +0800

    Use more reliable way to distinguish rt-server being used as psgi file.

diff --git a/sbin/rt-server.in b/sbin/rt-server.in
index afef62c..5f884d9 100755
--- a/sbin/rt-server.in
+++ b/sbin/rt-server.in
@@ -155,7 +155,7 @@ if ($ENV{RT_TESTING}) {
 }
 
 # when used as a psgi file
-unless ($0 eq __FILE__) {
+if (caller) {
     return $app;
 }
 

commit cdafa34ddf702836964fc9bb577f20237f33108e
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Thu Feb 24 21:54:56 2011 +0800

    Make AddJavaScript and AddStyleSheet effective in test config so web/squish tests pass for apache.

diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index c6478a5..9375d58 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -312,8 +312,13 @@ sub set_config_wrapper {
     my $old_sub = \&RT::Config::Set;
     no warnings 'redefine';
     *RT::Config::Set = sub {
-        my @caller = caller;
-        if ( ($caller[1]||'') =~ /\.t$/ ) {
+        # Determine if the caller is either from a test script, or
+        # from helper functions called by test script to alter
+        # configuration that should be written.
+        my @caller = caller(1); # preserve list context
+        @caller = caller(0) unless @caller;
+
+        if ( ($caller[1]||'') =~ /\.t$/) {
             my ($self, $name) = @_;
             my $type = $RT::Config::META{$name}->{'Type'} || 'SCALAR';
             my %sigils = (

-----------------------------------------------------------------------


More information about the Rt-commit mailing list