Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #600 from marccohen/master
Browse files Browse the repository at this point in the history
fix handling of Null (None) Content-Type header for resumable uploads
  • Loading branch information
mfschwartz committed Feb 27, 2012
2 parents c0b5374 + 33fb4d2 commit 3a825d7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions boto/gs/resumable_upload_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,12 @@ def send_file(self, key, fp, headers, cb=None, num_cb=10):

if not headers:
headers = {}
# If Content-Type header is present and set to None, remove it.
# This is gsutil's way of asking boto to refrain from auto-generating
# that header.
CT = 'Content-Type'
if CT in headers and not headers[CT]:
del headers[CT]

fp.seek(0, os.SEEK_END)
file_length = fp.tell()
Expand Down

0 comments on commit 3a825d7

Please sign in to comment.