During a source DVD jigdo download, I get: http://download.fedoraproject.org/pub/fedora/linux/releases/test/9-Beta/Fedora/source/SRPMS/libsigc++20-2.2.0-1.fc9.src.rpm ... 307 Temporary Redirect Location: http://mirrors.fedoraproject.org/mirrorlist?path=pub/fedora/linux/releases/test/9-Beta/Fedora/source/SRPMS/libsigc++20-2.2.0-1.fc9.src.rpm&redirect=1 [following] http://mirrors.fedoraproject.org/mirrorlist?path=pub/fedora/linux/releases/test/9-Beta/Fedora/source/SRPMS/libsigc++20-2.2.0-1.fc9.src.rpm&redirect=1 ... 302 Moved Temporarily Location: http://fedora.c3sl.ufpr.br/linux/releases/test/9-Beta/Fedora/source/SRPMS/libsigc 20-2.2.0-1.fc9.src.rpm [following] http://fedora.c3sl.ufpr.br/linux/releases/test/9-Beta/Fedora/source/SRPMS/libsigc%20%2020-2.2.0-1.fc9.src.rpm ... 404 Not Found I get similar problems attempting to download binaries for gcc-c++ and libstdc++, but the error for sources is the one I have handy.
This smells like the old + vs %20 problem again.
Actually + needs to become %2b as %20 is a space character
Fedora Unity solved this with s/+/%2b/ in the jigdo itself. We might want to solve this at the server level, though. I have a really quick rewrite map written up, we should implement it.
Rewritemap: -------------------------------------------------------------------------------- #!/usr/bin/perl use strict; $| = 1; while(<STDIN>) { chomp($_); my ($url) = "http://mirrors.fedoraproject.org/mirrorlist?redirect=1&path=pub/fedora/linux/" . filter($_); print $url; # Debug print "\n"; } sub filter { my($pure) = @_; $pure =~ s/([^a-zA-Z0-9_\-. ])/uc sprintf("%%%02x",ord($1))/eg; # We need our / $pure =~ s/%2F/\//g; return $pure; } -------------------------------------------------------------------------------- Implement it with: RewriteEngine On RewriteMap seo_download prg:/var/www/download.pl RewriteRule ^/download/(.*)$ ${seo_download:$1} [R,L] This is testing and running on my dev server. http://dev.damaestro.us/download/releases/test/9-Beta/Fedora/source/SRPMS/libsigc++20-2.2.0-1.fc9.src.rpm I would, however, recommend chaining the rewrite with a modified logic (see next comment.)
Make sure to have a RewriteLock defined also: http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritelock See next comment for the chained rewrite map.
Rewrite map: -------------------------------------------------------------------------------- #!/usr/bin/perl use strict; $| = 1; while(<STDIN>) { chomp($_); my ($url) = "/download-chain/" . filter($_); print $url; # Debug print "\n"; } sub filter { my($pure) = @_; $pure =~ s/([^a-zA-Z0-9_\-. ])/uc sprintf("%%%02x",ord($1))/eg; # We need our / $pure =~ s/%2F/\//g; return $pure; } -------------------------------------------------------------------------------- Implemented with: RewriteEngine On RewriteMap seo_download_chain prg:/var/www/download-chain.pl RewriteRule ^/download-chain/(.*)$ ${seo_download_chain:$1} RewriteRule ^/download-chain/(.*)$ http://mirrors.fedoraproject.org/mirrorlist?redirect=1&path=pub/fedora/linux/$1 [R,L] Obviously, you can [R]edirect to anywhere you want. This is now implemented on my dev server: http://dev.damaestro.us/download-chain/releases/test/9-Beta/Fedora/source/SRPMS/libsigc++20-2.2.0-1.fc9.src.rpm
From the uninitated, I would think mirror manager should simply clean the urls before handing them back to the client. Looking in the MM code, where it does the mirrorlist, it could just call urllib.quote(path), which would properly translate + to %2B. Of course, this breaks down if you actually pass a url with %2B in it to urllib.quote (silly bugger). Seems you can unquote safely and then re-quote. I'm attaching a mirrormanager patch that may fix it, but I don't have a good way of testing.
Created attachment 299214 [details] Patch to translate urls
Fixed March 27 with commit 28dde0cf56814f7b87b3edfe9d1444df3cadf625 to mirrormanager.