Actually it might be more obvious than it seems.

When the PUT request is done, an open file handle is passed as the
'body' argument to httplib2 request(). Since there was a timeout and
retry, the file handle was read from so the current position in the file
has moved. There's no seek() back to the beginning of the file on retry,
so Content-Length doesn't match the body that was sent anymore.

Seems like the 'body' should be seek()'d back to the beginning (or to
the original position, by getting position with tell() before the
request) on retry if it's a file handle.

Testing to see if this fixes the problem.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1161599

Title:
  Backup to Ubuntu one failed, after 5 attempts status 400 bad request

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/deja-dup/+bug/1161599/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to