[Jifty-commit] r4962 - jifty/trunk/lib/Jifty

Jifty commits jifty-commit at lists.jifty.org
Wed Jan 30 02:11:30 EST 2008


Author: bokutin
Date: Wed Jan 30 02:11:27 2008
New Revision: 4962

Modified:
   jifty/trunk/lib/Jifty/Dispatcher.pm

Log:
utf8 on $path cause garbage characters in Mason.
This problem line in HTML::Mason::Compiler::raw_block() is
	$comment = "#line $line $file\n" if $self->use_source_line_numbers;
If utf8 on $path was pass
	UTF8_ON  = "#line UTF8_OFF UTF8_ON" ( $file is $path )

Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm	(original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm	Wed Jan 30 02:11:27 2008
@@ -473,7 +473,9 @@
     local $SIG{__DIE__} = 'DEFAULT';
 
     eval {
-        $Dispatcher->_do_dispatch( Jifty->web->request->path);
+        my $path = Jifty->web->request->path;
+        utf8::downgrade($path); # Mason handle non utf8 path.
+        $Dispatcher->_do_dispatch( $path );
     };
     if ( my $err = $@ ) {
         $self->log->warn(ref($err) . " " ."'$err'") if ( $err !~ /^ABORT/ );


More information about the Jifty-commit mailing list