summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/ups5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ups b/bin/ups
index 6ca206f..50e35ba 100755
--- a/bin/ups
+++ b/bin/ups
@@ -8,7 +8,7 @@ import shutil
import ssl
import subprocess
import sys
-from urllib import request, error as urlerror
+from urllib import parse, request, error as urlerror
try:
import magic
@@ -46,7 +46,8 @@ ssl_ctx.load_default_certs()
src = sys.stdin.buffer if args.path == '-' else open(args.path, 'rb')
-req = request.Request(server + dst_name, data = src, method = 'POST')
+req = request.Request(server + parse.quote(dst_name),
+ data = src, method = 'POST')
try:
resp = request.urlopen(req, context = ssl_ctx)
except KeyboardInterrupt: