--- apt_proxy.py	2006-08-15 00:00:45.000000000 +0200
+++ /root/apt_proxy.py.new	2006-09-08 09:07:49.849166662 +0200
@@ -182,6 +182,10 @@
 
         self.scheme, netloc, self.path, parameters, \
                      query, fragment = urlparse.urlparse(uri)
+
+	# ``~`` are allowed in urls!!!
+	self.path = self.path.replace("%7e", "~")
+
         if is_rsync:
             self.scheme = 'rsync'
 
@@ -284,6 +288,10 @@
     def clean_path(self, uri):
         # Clean up URL given
         scheme, netloc, path, params, query, fragment = urlparse.urlparse(uri)
+
+	# ``~`` are allowed in urls!!!
+	path = path.replace("%7e", "~")
+
         return os.path.normpath(path)
 
     def not_modified(self):

