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

Incorrect ContentType set on CSS GZipped files uploaded to AWS

ArthurThornton opened this issue · comments

There was an issue that my company/team experienced last week when using this module as part of our grunt deployment process, where it was setting the wrong Content-Type header for CSS files uploaded to AWS. The value should be "text/css" but it was being set to "application/javascript; charset=utf-8".

After looking into this I've discovered this issue occurred at some point after 0.12.1, which we were using previously. I had recently updated npm modules prior to that deploy and was using the most recent version, which has this issue.

I've not yet looked to see what may have caused the issue.

Thanks for reporting! From the top of my head, I'm not sure where the issue can be, but since you have a version number that worked before, it'll help pinpoint the issue. I'm unfortunately quite busy right now, but it's certainly an issue I (or you?) should look into soon.

I'm experiencing the same issue. It appears to be triggered by a *.gz file in the same directory as other non-gzipped files. If a gzipped file is present all files in the directory receive the same content type. If the gzipped file is removed from the directory the content types are set correctly.

Hi all. Finally found out where this came from. The params object is set by reference by Grunt and as result the changes that I thought were happening on a single file object were spreading to all of them. I've pushed a fix on master, will publish a version very soon.

Published in 0.14.1