[Catalyst-commits] r11563 -
Catalyst-Plugin-Session-State-URI/trunk/lib/Catalyst/Plugin/Session/State
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Fri Oct 16 15:10:00 GMT 2009
Author: rafl
Date: 2009-10-16 15:10:00 +0000 (Fri, 16 Oct 2009)
New Revision: 11563
Modified:
Catalyst-Plugin-Session-State-URI/trunk/lib/Catalyst/Plugin/Session/State/URI.pm
Log:
Remove trailing whitespace.
Modified: Catalyst-Plugin-Session-State-URI/trunk/lib/Catalyst/Plugin/Session/State/URI.pm
===================================================================
--- Catalyst-Plugin-Session-State-URI/trunk/lib/Catalyst/Plugin/Session/State/URI.pm 2009-10-16 15:09:24 UTC (rev 11562)
+++ Catalyst-Plugin-Session-State-URI/trunk/lib/Catalyst/Plugin/Session/State/URI.pm 2009-10-16 15:10:00 UTC (rev 11563)
@@ -157,13 +157,13 @@
my ( $c, $sid ) = @_;
my $body = $c->response->body || return;
-
+
$c->log->debug("Rewriting plain body with URI::Find")
if $c->debug;
URI::Find->new(sub {
my ( $uri, $orig_uri ) = @_;
-
+
if ( $c->session_should_rewrite_uri($uri) ) {
my $rewritten = $c->uri_with_sessionid($uri, $sid);
if ( $orig_uri =~ s/\Q$uri/$rewritten/ ) {
@@ -186,7 +186,7 @@
my ( $c, $sid ) = @_;
my $location = $c->response->location || return;
-
+
$c->log->debug("Rewriting location header")
if $c->debug;
@@ -244,11 +244,11 @@
sub uri_for {
my ( $c, $path, @args ) = @_;
-
+
return $c->_session_plugin_config->{overload_uri_for}
? $c->uri_with_sessionid($c->maybe::next::method($path, @args))
: $c->maybe::next::method($path, @args);
-}
+}
sub uri_with_sessionid {
my ( $c, $uri, $sid ) = @_;
@@ -286,10 +286,10 @@
my ( $c, $uri_text ) = @_;
my $uri_obj = eval { URI->new($uri_text) } || return;
-
+
# ignore the url outside
my $rel = $uri_obj->abs( $c->request->base );
-
+
return unless index( $rel, $c->request->base ) == 0;
return unless $c->session_should_rewrite_uri_mime_type($rel);
@@ -314,7 +314,7 @@
# ignore media type such as gif, pdf and etc
if ( $uri->path =~ m#\.(\w+)(?:\?|$)# ) {
my $mt = new MIME::Types->mimeTypeOf($1);
-
+
if ( ref $mt ) {
return if $mt->isBinary;
}
More information about the Catalyst-commits
mailing list