[prev in list] [next in list] [prev in thread] [next in thread] 

List:       svk-devel
Subject:    [svk-devel] [PATCH] Bad URL passed to RA layer: Malformed URL for
From:       list.svk () 0x ! hu (=?utf-8?B?UMOpdGVy?= Werner)
Date:       2007-10-07 6:03:03
Message-ID: 20071007093001.GA2682 () vasas ! no-ip ! org
[Download RAW message or body]

Hi,

I had problem mirroring one of my svn repositories.

It seems some escaping is missing from SVN::Mirror, see the attached
oneliner patch, which solved my problem.

http://rt.openfoundry.org/Foundry/Project/Tracker/Display.html?Queue=82&id=29840
http://rt.cpan.org/Ticket/Display.html?id=28118

http://lists.bestpractical.com/pipermail/svk-devel/2007-January/000549.html
http://lists.bestpractical.com/pipermail/svk-devel/2007-June/000944.html

  WP
-------------- next part --------------
--- SVN-Mirror-0.73.orig/lib/SVN/Mirror/Ra.pm	2007-03-19 23:59:12.000000000 +0100
+++ SVN-Mirror-0.73/lib/SVN/Mirror/Ra.pm	2007-10-07 08:37:36.000000000 +0200
@@ -168,6 +168,9 @@
     $self->{config} ||= SVN::Core::config_get_config(undef, $self->{pool});
     $self->{auth} ||= $self->_new_auth;
 
+    # escape URI (% is already escaped)
+    $arg{'url'} =~ s/([^-_:.%\/a-zA-Z0-9])/sprintf("%%%02X", ord($1))/eg if defined $arg{'url'};
+
     SVN::Ra->new( url => $self->{rsource},
 		  auth => $self->{auth},
 		  config => $self->{config},

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic