Package: debmirror
Version: 20070123
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When executing debmirror like debmirror --host=domain.tld:8080 --method=http 
--root=/ the url used to 
download the files looks is http://domain.tld:8080///
This is fine with some non-micro http server which correctly resolve the three 
slashes to a single one.
But dhttpd, for example, throws a 403 Forbidden instead.

All the attachment/patch does is replace multiple slashes with a single one.

Note: this bug also affects old versions


- -- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing'), (100, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.21-2-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGsMwhYy49rUbZzloRAlEZAKCBiQkJr4s9ecEr44zfIbe+p8BwaACeOkjx
2tMTWopq1CZNZQbCUvttOPA=
=fmKc
-----END PGP SIGNATURE-----
--- debmirror-20070123.orig/debmirror   2007-01-24 04:42:14.000000000 -0600
+++ debmirror-20070123/debmirror        2007-08-01 12:57:32.000000000 -0500
@@ -1247,7 +1247,9 @@
   $| = 1;
   my $file=shift;
   my $percent = 0;
-  my $url="http://${host}/${remoteroot}/${file}";;
+  my $url="${host}/${remoteroot}/${file}";
+  $url =~ s|[/]{2,}|/|g;
+  $url = "http://"; . $url;
   my $ret=1;
   $percent = sprintf("%3.0f",(($bytes_gotten/$bytes_to_get)*100)) 
unless($bytes_to_get == 0);
 

Reply via email to