perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From go...@apache.org
Subject svn commit: r385693 - in /perl/modperl/branches/1.x: Changes lib/Apache/PerlRun.pm lib/Apache/Registry.pm
Date Mon, 13 Mar 2006 23:10:09 GMT
Author: gozer
Date: Mon Mar 13 15:10:07 2006
New Revision: 385693

URL: http://svn.apache.org/viewcvs?rev=385693&view=rev
Log:
Fix an Apache::(Registry|PerlRun) bug caused by special characters
+in the url. Url characters with ord(n) < 10 would not be escaped
proprely and leave a litteral space in the package name

Submitted-By: kolya@mail.ru


Modified:
    perl/modperl/branches/1.x/Changes
    perl/modperl/branches/1.x/lib/Apache/PerlRun.pm
    perl/modperl/branches/1.x/lib/Apache/Registry.pm

Modified: perl/modperl/branches/1.x/Changes
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/1.x/Changes?rev=385693&r1=385692&r2=385693&view=diff
==============================================================================
--- perl/modperl/branches/1.x/Changes (original)
+++ perl/modperl/branches/1.x/Changes Mon Mar 13 15:10:07 2006
@@ -10,6 +10,9 @@
 
 =item 1.30_01-dev
 
+Fix an Apache::(Registry|PerlRun) bug caused by special characters
+in the url [kolya@mail.ru]
+
 Display a more verbose message if Apache.pm can't be loaded
 [Geoffrey Young]
 

Modified: perl/modperl/branches/1.x/lib/Apache/PerlRun.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/1.x/lib/Apache/PerlRun.pm?rev=385693&r1=385692&r2=385693&view=diff
==============================================================================
--- perl/modperl/branches/1.x/lib/Apache/PerlRun.pm (original)
+++ perl/modperl/branches/1.x/lib/Apache/PerlRun.pm Mon Mar 13 15:10:07 2006
@@ -189,14 +189,14 @@
     my $script_name = $pr->namespace_from;
 
     # Escape everything into valid perl identifiers
-    $script_name =~ s/([^A-Za-z0-9_\/])/sprintf("_%2x",unpack("C",$1))/eg;
+    $script_name =~ s/([^A-Za-z0-9_\/])/sprintf("_%02x",unpack("C",$1))/eg;
 
     # second pass cares for slashes and words starting with a digit
     $script_name =~ s{
 			  (/+)       # directory
 			  (\d?)      # package's first character
 			 }[
-			   "::" . (length $2 ? sprintf("_%2x",unpack("C",$2)) : "")
+			   "::" . (length $2 ? sprintf("_%02x",unpack("C",$2)) : "")
 			  ]egx;
 
     $Apache::Registry::curstash = $script_name;

Modified: perl/modperl/branches/1.x/lib/Apache/Registry.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/1.x/lib/Apache/Registry.pm?rev=385693&r1=385692&r2=385693&view=diff
==============================================================================
--- perl/modperl/branches/1.x/lib/Apache/Registry.pm (original)
+++ perl/modperl/branches/1.x/lib/Apache/Registry.pm Mon Mar 13 15:10:07 2006
@@ -81,14 +81,14 @@
 	}
 
 	# Escape everything into valid perl identifiers
-	$script_name =~ s/([^A-Za-z0-9_\/])/sprintf("_%2x",unpack("C",$1))/eg;
+	$script_name =~ s/([^A-Za-z0-9_\/])/sprintf("_%02x",unpack("C",$1))/eg;
 
 	# second pass cares for slashes and words starting with a digit
 	$script_name =~ s{
 			  (/+)       # directory
 			  (\d?)      # package's first character
 			 }[
-			   "::" . (length $2 ? sprintf("_%2x",unpack("C",$2)) : "")
+			   "::" . (length $2 ? sprintf("_%02x",unpack("C",$2)) : "")
 			  ]egx;
 
 	my $package = "Apache::ROOT$script_name";



Mime
View raw message