This way we can catch all all GET and POST calls as https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html indicates we should do. This also lets us [ls] an object in a requester-pays bucket which we couldn't do before.
…emote2remote: If there was failed copy, seq number was preserved but previously uploaded file number was forgotten, thus user could have faced an invalid indication like: 14/8 when there is 6 upload following 6 remote copy failures.
…are bytes, so unicodise them also)
…e start of the operation (reported by a status 200 but an "Error" root entry in the xml body) In addition, for the move, It is good to check for the CopyObject xml reply to see if it is a success. But, if there is a status of 200 and no "data" in response, don't fail. Other S3 server implementations use only status code and don't return any body when there is no error. References: http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html http://doc.s3.amazonaws.com/proposals/copy.html
Suggested by Debian patches. This automatically escapes dashes and the word 'Cache-Control' in the generated manpage. There is still an instance where the word Cache-Control is getting split across newlines due to the 80-character limit, which it doesn't catch, but it doesn't break the formatting of the rest of the manpage. It just looks like 'Cache- Control' in the result (note the extra space after the dash). I'll live with that.
…rror expect an http response, not a text message)
…hed to "unicode" call instead of "decode" as it is supposed to be more efficient.
… 0 byte to read. So httplib doesn't think that there is a response waiting to be read when the next request come. Straightforward to fix thanks to the detailed analysis of Edwintorok. << This seems to be due to this in python 2.7.9rc1's httplib: if self.__state != _CS_REQ_SENT or self.__response: raise ResponseNotReady() Apparently python created a response object for the content-length: 0 reply (for GET /0) and s3cmd didn't read/close that response object, and now it gives an error when you try to read anything else on the same persistent connection. >>
… unicodise conversion + fixed the removal of most of useless or invalid unicodise/decodise in the code.
…ers (chinese, japanese, ...) in file names, folder or path arguments (Should fix bug like #417i) when UTF-8 is not the system def$ Now, in theory, everything that gets in should be converted to unicoded and then things would be converted back to string (user defined encoding) at the outmost parts when dealing with the system. When talking to S3, convert unicode to strings in utf-8 encoding. Validated with run-test.py in a computer with utf-8 as default encoding and a one with ANSI C as default encoding.