Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for --content-encoding #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions s3-parallel-put
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ def putter(put, put_queue, stat_queue, options):
else:
content_type = options.content_type
headers['Content-Type'] = content_type

if options.content_encoding:
headers['Content-Encoding'] = options.content_encoding

content = value.get_content()
md5 = value.md5
Expand Down Expand Up @@ -384,6 +387,8 @@ def main(argv):
group.add_option('--content-type', default='guess', metavar='CONTENT-TYPE',
help='set content type, set to "guess" to guess based on file name '
'or "magic" to guess by filename and libmagic.')
group.add_option('--content-encoding', default=None, metavar='CONTENT-ENCODING',
help='set content encoding.')
group.add_option('--gzip', action='store_true',
help='gzip values and set content encoding')
group.add_option('--gzip-type', action='append', default=[],
Expand Down