nodeurl += "/"
url = nodeurl + "uri/%s/" % urllib.quote(root_uri.replace("/","!"))
if vdrive_fname:
- url += vdrive_fname
+ url += urllib.quote(vdrive_fname)
if local_file is None or local_file == "-":
outf = stdout
nodeurl += "/"
url = nodeurl + "uri/%s/" % urllib.quote(root_uri.replace("/","!"))
if vdrive_pathname:
- url += vdrive_pathname
+ url += urllib.quote(vdrive_pathname)
url += "?t=json"
data = urllib.urlopen(url).read()
from allmydata.scripts.common_http import do_http
def mv(nodeurl, root_uri, frompath, topath, stdout, stderr):
+ frompath = urllib.quote(frompath)
+ topath = urllib.quote(topath)
if nodeurl[-1] != "/":
nodeurl += "/"
url = nodeurl + "uri/%s/" % urllib.quote(root_uri.replace("/","!"))
url = "/vdrive/global/"
if vdrive_fname:
- url += vdrive_fname
+ url += urllib.quote(vdrive_fname)
if local_fname is None or local_fname == "-":
infileobj = sys.stdin
nodeurl += "/"
url = nodeurl + "uri/%s/" % urllib.quote(root_uri.replace("/","!"))
if vdrive_fname:
- url += vdrive_fname
+ url += urllib.quote(vdrive_fname)
infileobj = open(local_fname, "rb")
resp = do_http("PUT", url, infileobj)
nodeurl += "/"
url = nodeurl + "uri/%s/" % urllib.quote(root_uri.replace("/","!"))
if vdrive_pathname:
- url += vdrive_pathname
+ url += urllib.quote(vdrive_pathname)
resp = do_http("DELETE", url)