{"action":"created","issue":{"url":"https://api.github.com/repos/s3tools/s3cmd/issues/643","labels_url":"https://api.github.com/repos/s3tools/s3cmd/issues/643/labels{/name}","comments_url":"https://api.github.com/repos/s3tools/s3cmd/issues/643/comments","events_url":"https://api.github.com/repos/s3tools/s3cmd/issues/643/events","html_url":"https://github.com/s3tools/s3cmd/issues/643","id":109897336,"number":643,"title":"s3cmd sync: Remote copy does not respect mime type","user":{"login":"voidstardb","id":1476722,"avatar_url":"https://avatars.githubusercontent.com/u/1476722?v=3","gravatar_id":"","url":"https://api.github.com/users/voidstardb","html_url":"https://github.com/voidstardb","followers_url":"https://api.github.com/users/voidstardb/followers","following_url":"https://api.github.com/users/voidstardb/following{/other_user}","gists_url":"https://api.github.com/users/voidstardb/gists{/gist_id}","starred_url":"https://api.github.com/users/voidstardb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voidstardb/subscriptions","organizations_url":"https://api.github.com/users/voidstardb/orgs","repos_url":"https://api.github.com/users/voidstardb/repos","events_url":"https://api.github.com/users/voidstardb/events{/privacy}","received_events_url":"https://api.github.com/users/voidstardb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-05T22:12:18Z","updated_at":"2015-10-05T23:21:48Z","closed_at":null,"body":"Steps:\r\n\r\n1. Using s3cmd, upload a .js file to folder A, but force a mime type of text/plain\r\n2. Upload the same .js file to folder B, but allow s3cmd to automatically set the mime type\r\n\r\nResult: remote copy A/file.js -> B/file.js (md5 matches as expected). However B/file.js has mime type of text/plain.\r\n\r\nExpected: B/file.js exists with mime type application/javascript.\r\n\r\nEither the remote copy logic should take the mime type into account, setting the mimetype on the copied file, or remote copy should be disabled if the mime type of the source file and the mime type of the uploaded file differs. This bug causes a cascading problem where once a file is uploaded with an incorrect mime type, the only way to fix it is to either delete the source files to prevent further copying of bad mime types or manually go through all the files and update their mime types.\r\n\r\nUploading a new file with the intended mime type should always result in that file being there with the specified mime type."},"comment":{"url":"https://api.github.com/repos/s3tools/s3cmd/issues/comments/145696551","html_url":"https://github.com/s3tools/s3cmd/issues/643#issuecomment-145696551","issue_url":"https://api.github.com/repos/s3tools/s3cmd/issues/643","id":145696551,"user":{"login":"voidstardb","id":1476722,"avatar_url":"https://avatars.githubusercontent.com/u/1476722?v=3","gravatar_id":"","url":"https://api.github.com/users/voidstardb","html_url":"https://github.com/voidstardb","followers_url":"https://api.github.com/users/voidstardb/followers","following_url":"https://api.github.com/users/voidstardb/following{/other_user}","gists_url":"https://api.github.com/users/voidstardb/gists{/gist_id}","starred_url":"https://api.github.com/users/voidstardb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voidstardb/subscriptions","organizations_url":"https://api.github.com/users/voidstardb/orgs","repos_url":"https://api.github.com/users/voidstardb/repos","events_url":"https://api.github.com/users/voidstardb/events{/privacy}","received_events_url":"https://api.github.com/users/voidstardb/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T23:21:48Z","updated_at":"2015-10-05T23:21:48Z","body":"Yes. 1.6.0 is what I'm using. Sorry for not including that information. I'm on Mac 10.10.5. Python 2.7.10."}}