MathieuLoutre / grunt-aws-s3

Grunt plugin to interact with AWS S3 using the AWS SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Content-Encoding gzip meta-tag being added to non-gzip files

dennisfoconnor opened this issue · comments

This only started occurring when I added the 'CacheControl' param.

files: [
          { expand: true, dest: 'recipe_decorator/', cwd: 'dist/', src: ['decorator.*', 'mgd.css.gz', 'mgd.css'], action: 'upload', params: { 'CacheControl': 'max-age=6000'} }
        ]

Every file uploaded to S3 was tagged with Content-Encoding gzip.

Separating out the gzip file corrected this the problem, but its not ideal:

files: [
          { expand: true, dest: 'recipe_decorator/', cwd: 'dist/', src: ['decorator.min.js', 'mgd.css'], action: 'upload', params: { 'CacheControl': 'max-age=6000'} },
          { expand: true, dest: 'recipe_decorator', cwd: 'dist/', src: ['mgd.css.gz', 'decorator.min.js.gz'], action: 'upload', params: { 'CacheControl': 'max-age=6000'} }
        ]

Sorry for never replying to that issue. That had been flagged in #73 but your config actually helped me narrow down the issue and I've just pushed a fix. It's not yet published but will be very soon. Sorry for the delay again, hope that hasn't affected you too much.

Published in 0.14.1