Hello,

Please bear with me here, because I don't exactly know what I'm talking about.

Here is the error message from s3cmd (along with the line I typed just before the error occurred):

Richards-MacBook-Pro:WWEDev harrington$ s3cmd put --acl-public --guess-mime-type --encoding identity ~/Desktop/p2plobby-test.html s3://cdn.livegamerads.com/Partner/WWEDev/p2plobby-test.html

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
  Please report the following lines to:
   s3tools-bugs@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Problem: LookupError: unknown encoding: identity
S3cmd:   1.5.0-alpha2

Traceback (most recent call last):
  File "/usr/local/bin/s3cmd", line 2063, in <module>
    main()
  File "/usr/local/bin/s3cmd", line 1941, in main
    sys.stdout = codecs.getwriter(cfg.encoding)(sys.stdout, "replace")
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py", line 994, in getwriter
    return lookup(encoding).streamwriter
LookupError: unknown encoding: identity

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
    Please report the above lines to:
   s3tools-bugs@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


I know I'm not supposed to set --encoding to "identity", but I can't figure out what else to do. My problem is that I am having trouble downloading files using Cyberduck that I uploaded using s3cmd. If this is my only problem, I can work around it, but I'm worried that there's something else going on that may cause other problems.

When I upload a file using s3cmd and then try to download it using Cyberduck, Cyberduck gives me the following error:

HTTP Error: Download failed
/<path and filename>
Unsupported Content-Coding: UTF-8.

with the following header info:

Accept-Ranges: bytes
Content-Type: text/html
Content-Length: 4697
Server: AmazonS3
GET /Partner%2FWWEDev%2Fchallengeroom.html HTTP/1.1
Date: Wed, 27 Mar 2013 19:31:47 GMT
Authorization: AWS AKIAIKU4SZ3RXJ6JS6GA:im3VvOaBNDSQkWmwMgLesZetsyw=
Host: cdn.livegamerads.com.s3.amazonaws.com:443
Connection: Keep-Alive
User-Agent: Cyberduck/4.2.1 (Mac OS X/10.7.5) (i386)
HTTP/1.1 200 OK
x-amz-id-2: 1Pk0TbS0pbalTIFPvE67EnksKEqor0PCU2EDNMeZ/y0Oej0uQprtpx8z+ebSkha4
x-amz-request-id: F69A52D7E695ACBB
Date: Wed, 27 Mar 2013 19:31:48 GMT
Content-Encoding: UTF-8
Last-Modified: Wed, 27 Mar 2013 17:21:09 GMT
ETag: "8deedd323456c108dca370a11be49c95"
Accept-Ranges: bytes
Content-Type: text/html
Content-Length: 8335
Server: AmazonS3


If the file is uploaded using Cyberduck, it downloads fine with Cyberduck. 

I'm not exactly sure what "Content-Coding" is (in that 3-line error message above). It could refer to the character encoding (UTF-8, Western ISO 8859-1, etc.) or it could refer to the Content-Encoding header, which should be something like gzip, deflate, compress, or something like that. I gather that "identity" is something that can be put into the Accept-Encoding header to indicate that the file may be transferred as-is, but it should not be put into the "Content-Coding" header directly.

I'm probably wrong, but it seems to me that s3cmd might be setting the wrong header. It's setting Content-Encoding to the character encoding of the file (or something else, if you force it with the --encoding flag), but that header line should be reserved for compression options.

Am I wrong here?

(By the way, the above s3cmd error report also gets generated when I put in other compression-related values for the --encode flag, like "gzip" or "compress". If I put "ascii," then the s3cmd upload works, but then the above Cyberduck error report comes back with "Unsupported Content-Coding: ASCII".)

Thanks,
Richard