[Rt-commit] rt branch, 3.999-trunk, updated. 089d41b7577f39576f0edc25f5b32ff0fb92a758

clkao at bestpractical.com clkao at bestpractical.com
Fri Jan 1 21:16:11 EST 2010


The branch, 3.999-trunk has been updated
       via  089d41b7577f39576f0edc25f5b32ff0fb92a758 (commit)
       via  5f026bd3e97d5085b035b730d3d9ef4356e05acb (commit)
      from  1d3035fd3ea8d2e1af5b55b6e1406fbe52bf177e (commit)

Summary of changes:
 lib/RT/Interface/Web.pm    |    4 ++--
 lib/RT/Test.pm             |    2 ++
 share/html/Elements/Header |    4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 5f026bd3e97d5085b035b730d3d9ef4356e05acb
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Fri Jan 1 12:28:45 2010 +0800

    Use header_out instead of headers_out to be more future-proof.

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index fcf6f69..c3f6bf6 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -189,12 +189,12 @@ This routine could really use _accurate_ heuristics. (XXX TODO)
 
 sub static_file_headers {
     # make cache public
-    $HTML::Mason::Commands::r->headers_out->{'Cache-Control'} = 'max-age=259200, public';
+    $HTML::Mason::Commands::r->header_out( 'Cache-Control' => 'max-age=259200, public' );
 
     # Expire things in a month.
     my $date = RT::DateTime->now;
     $date->add(months => 1);
-    $HTML::Mason::Commands::r->headers_out->{'Expires'} = $date->rfc2616;
+    $HTML::Mason::Commands::r->header_out( 'Expires' => $date->rfc2616);
 
     # if we set 'Last-Modified' then browser request a comp using 'If-Modified-Since'
     # request, but we don't handle it and generate full reply again
diff --git a/share/html/Elements/Header b/share/html/Elements/Header
index 36e5512..5e6e340 100755
--- a/share/html/Elements/Header
+++ b/share/html/Elements/Header
@@ -139,8 +139,8 @@ $page_nav->render_children_inline(1);
 
 <%INIT>
 $r->content_type('text/html; charset=utf-8');
-$r->headers_out->{'Pragma'} = 'no-cache';
-$r->headers_out->{'Cache-control'} = 'no-cache';
+$r->header_out('Pragma' => 'no-cache');
+$r->header_out('Cache-control' => 'no-cache');
 
 my $id = $m->request_comp->path;
 $id =~ s|^/||g;

commit 089d41b7577f39576f0edc25f5b32ff0fb92a758
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Fri Jan 1 12:30:37 2010 +0800

    Load the jifty compat plugin if available, until we are psgified.

diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 889aa67..b33401b 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -110,6 +110,8 @@ sub setup {
     $self->SUPER::setup($args);
 
     $self->_setup_config(@$args);
+    eval { require Jifty::Plugin::Compat; 1 };
+
     RT->init();
 }
 

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


More information about the Rt-commit mailing list