nitaigao/gulp-s3

gulp-s3 removes .gz suffix

jtblin opened this issue · 1 comments

I was surprised that gulp-s3 now removes .gz extensions from gzipped files. It wasn't the case with 0.2.x. Is there any reason why? It is pretty annoying and broke my deployments when upgrading.

if (regexGzip.test(file.path)) {
      // Set proper encoding for gzipped files, remove .gz suffix
      headers['Content-Encoding'] = 'gzip';
      uploadPath = uploadPath.substring(0, uploadPath.length - 3);
  }

Setting the header is good but why removing the extension?

This is a problem for me too. I'd like both raw and .gz files on S3 (with the .gz extension) so I can serve a different URL depending on client support.