From: Zooko O'Whielacronx Date: Thu, 20 Dec 2007 00:54:40 +0000 (-0700) Subject: remove some no-longer needed replacements of "/" with "!" in uris X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/COPYING.TGPPL.html?a=commitdiff_plain;h=a0d73f8afb73c35a764a1a8819d104cfead94620;p=tahoe-lafs%2Ftahoe-lafs.git remove some no-longer needed replacements of "/" with "!" in uris --- diff --git a/extensions/tahoe-fuse.py b/extensions/tahoe-fuse.py index 11b62d57..919ec476 100644 --- a/extensions/tahoe-fuse.py +++ b/extensions/tahoe-fuse.py @@ -254,7 +254,7 @@ class TahoeNode (object): def __init__(self, baseurl, uri): self.burl = baseurl self.uri = uri - self.fullurl = '%s/uri/%s' % (self.burl, self.uri.replace('/', '!')) + self.fullurl = '%s/uri/%s' % (self.burl, self.uri) self.inode = TahoeNode.NextInode TahoeNode.NextInode += 1 diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index 9f200dae..465f4175 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -829,7 +829,7 @@ class SystemTest(testutil.SignalMixin, unittest.TestCase): def _test_web(self, res): base = self.webish_url - public = "uri/" + self._root_directory_uri.replace("/", "!") + public = "uri/" + self._root_directory_uri d = getPage(base) def _got_welcome(page): expected = "Connected Peers: %d" % (self.numclients) @@ -924,7 +924,7 @@ class SystemTest(testutil.SignalMixin, unittest.TestCase): self.failUnless(self.webish_url in start_html) d = self.clients[0].get_private_uri() def done(private_uri): - private_url = self.webish_url + "uri/" + private_uri.replace("/","!") + private_url = self.webish_url + "uri/" + private_uri self.failUnless(private_url in start_html) d.addCallback(done) return d diff --git a/src/allmydata/test/test_web.py b/src/allmydata/test/test_web.py index ef54d045..fd270ce2 100644 --- a/src/allmydata/test/test_web.py +++ b/src/allmydata/test/test_web.py @@ -1318,7 +1318,7 @@ class Web(WebMixin, unittest.TestCase): return res def test_GET_URI_URL(self): - base = "/uri/%s" % self._bar_txt_uri.replace("/","!") + base = "/uri/%s" % self._bar_txt_uri d = self.GET(base) d.addCallback(self.failUnlessIsBarDotTxt) d.addCallback(lambda res: self.GET(base+"?filename=bar.txt")) @@ -1328,13 +1328,13 @@ class Web(WebMixin, unittest.TestCase): return d def test_GET_URI_URL_dir(self): - base = "/uri/%s?t=json" % self._foo_uri.replace("/","!") + base = "/uri/%s?t=json" % self._foo_uri d = self.GET(base) d.addCallback(self.failUnlessIsFooJSON) return d def test_GET_URI_URL_missing(self): - base = "/uri/%s" % self._bad_file_uri.replace("/","!") + base = "/uri/%s" % self._bad_file_uri d = self.GET(base) d.addBoth(self.shouldHTTPError, "test_GET_URI_URL_missing", http.GONE, response_substring="NotEnoughPeersError") @@ -1378,7 +1378,7 @@ class Web(WebMixin, unittest.TestCase): self.failUnless(uri in FakeCHKFileNode.all_contents) self.failUnlessEqual(FakeCHKFileNode.all_contents[uri], file_contents) - return self.GET("/uri/%s" % uri.replace("/","!")) + return self.GET("/uri/%s" % uri) d.addCallback(_check) def _check2(res): self.failUnlessEqual(res, file_contents) @@ -1399,7 +1399,7 @@ class Web(WebMixin, unittest.TestCase): n = self.s.create_node_from_uri(uri.strip()) d2 = self.failUnlessNodeKeysAre(n, []) d2.addCallback(lambda res: - self.GET("/uri/%s?t=json" % uri.replace("/","!"))) + self.GET("/uri/%s?t=json" % uri)) return d2 d.addCallback(_check) d.addCallback(self.failUnlessIsEmptyJSON)