Issue with special characters in file names.
If a filename has = in it we seem to throw a access denied.
Reproduce with
echo 'foo' > 'foo=bar.txt'
cpobj -D foo\=bar.txt test3:
INFO: Uploading /root/foo=bar.txt with 4 bytes.
DEBUG: path=/test3/foo%3Dbar.txt |
DEBUG: auth_path=/test3/foo%3Dbar.txt
DEBUG: Method: PUT
DEBUG: Path: /test3/foo%3Dbar.txt
DEBUG: Data:
DEBUG: Headers: {'Content-Length': '4', 'Content-MD5': u'07BzhNET7exJ6qYjitX/AA==', 'Content-Type': 'text/plain', 'Expect': '100-Continue', 'User-Agent': 'Boto/2.38.0 Python/2.7.6 SunOS/5.11'}
DEBUG: Host: gembox.cbcb.umd.edu
DEBUG: Port: 443
DEBUG: Params: {}
DEBUG: Token: None
DEBUG: StringToSign:
PUT
07BzhNET7exJ6qYjitX/AA==
text/plain
Mon, 10 Aug 2015 19:30:38 GMT
/test3/foo%3Dbar.txt
DEBUG: Signature:
AWS 6184Q96JZHTF8SNM2JK1:1uJTMibfSSIMF74XoFaGHYG3ThA=
DEBUG: Final headers: {'Content-Length': '4', 'Content-MD5': '07BzhNET7exJ6qYjitX/AA==', 'Expect': '100-Continue', 'Date': 'Mon, 10 Aug 2015 19:30:38 GMT', 'User-Agent': 'Boto/2.38.0 Python/2.7.6 SunOS/5.11', 'Content-Type': 'text/plain', 'Authorization': u'AWS 6184Q96JZHTF8SNM2JK1:1uJTMibfSSIMF74XoFaGHYG3ThA='}
Traceback (most recent call last):###################################################################################################|
File "/root/env/bin/cpobj", line 94, in <module>
args.multipart)
File "/root/env/lib/python2.7/site-packages/umobj/transfer.py", line 250, in obj_upload
res = upload_file(key, src)
File "/root/env/lib/python2.7/site-packages/umobj/transfer.py", line 48, in upload_file
num_cb=100)
File "/root/env/lib/python2.7/site-packages/boto/s3/key.py", line 1362, in set_contents_from_filename
encrypt_key=encrypt_key)
File "/root/env/lib/python2.7/site-packages/boto/s3/key.py", line 1293, in set_contents_from_file
chunked_transfer=chunked_transfer, size=size)
File "/root/env/lib/python2.7/site-packages/boto/s3/key.py", line 750, in send_file
chunked_transfer=chunked_transfer, size=size)
File "/root/env/lib/python2.7/site-packages/boto/s3/key.py", line 951, in _send_file_internal
query_args=query_args
File "/root/env/lib/python2.7/site-packages/boto/s3/connection.py", line 664, in make_request
retry_handler=retry_handler
File "/root/env/lib/python2.7/site-packages/boto/connection.py", line 1071, in make_request
retry_handler=retry_handler)
File "/root/env/lib/python2.7/site-packages/boto/connection.py", line 940, in _mexe
request.body, request.headers)
File "/root/env/lib/python2.7/site-packages/boto/s3/key.py", line 884, in sender
response.status, response.reason, body)
<type 'type'>: S3ResponseError: 403 Forbidden
<?xml version="1.0" encoding="UTF-8"?><Error><Code>AccessDenied</Code></Error>