Duplicity fails to back up to directories with spaces in B2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
If I try to back up to a B2 key that contains a space (b2://user@
I'm using duplicity 0.7.14 on Ubuntu 16.04 from the PPA.
/usr/bin/duplicity --name duply_purchased
<snip>
Registering (mktemp) temporary file /tmp/duplicity-
Getting file duplicity-
Getting https:/
0170913T000217Z
Backtrace of previous error: Traceback (innermost last):
File "/usr/lib/
return fn(self, *args)
File "/usr/lib/
self.
File "/usr/lib/
resp = self.get_
File "/usr/lib/
raise e
HTTPError: HTTP Error 505: HTTP Version Not Supported
Attempt 1 failed. HTTPError: HTTP Error 505: HTTP Version Not Supported
Changed in duplicity: | |
importance: | Undecided → Medium |
milestone: | none → 0.7.18 |
status: | New → Fix Committed |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
IMHO this bug is important, because we're not in the 8+3 names' era anymore.
I've been playing around a bit with the code and it would seem this is an encoding issue. The Backblaze instructions on the subject [1] do not seem correct, as experimentally, at least the X-Bz-File-Name header should *not* be encoded (probably others as well). That leaves mainly the _get function to be encoded. A poor man's encoding (replacing spaces with "%20" or "+") seems to work, but a full solution should properly encode all URLs sent to B2.
[1] https:/ /www.backblaze. com/b2/ docs/string_ encoding. html