summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Schwartz <mfschwartz@google.com>2010-08-31 16:46:55 -0700
committerMike Schwartz <mfschwartz@google.com>2010-08-31 16:46:55 -0700
commitfc8305c0fe7fcec69fe841bb004b580f60dd1e43 (patch)
tree9560f276509f0ef4084d5ce383f7f44cb729acec
parent09ca5ace9fe99cf336bf9313ca605d1248c5f4a0 (diff)
downloadboto-fc8305c0fe7fcec69fe841bb004b580f60dd1e43.tar.gz
Fixed bug in boto/s3/key.py that caused mimetypes.guess_type() to override Content-Type explicitly set in headers.
-rw-r--r--boto/s3/key.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/boto/s3/key.py b/boto/s3/key.py
index 38939e18..d00c99e7 100644
--- a/boto/s3/key.py
+++ b/boto/s3/key.py
@@ -458,10 +458,10 @@ class Key(object):
if self.storage_class != 'STANDARD':
provider = self.bucket.connection.provider
headers[provider.storage_class_header] = self.storage_class
- if headers.has_key('Content-Type'):
- self.content_type = headers['Content-Type']
if headers.has_key('Content-Encoding'):
self.content_encoding = headers['Content-Encoding']
+ if headers.has_key('Content-Type'):
+ self.content_type = headers['Content-Type']
elif self.path:
self.content_type = mimetypes.guess_type(self.path)[0]
if self.content_type == None: