2

I am using asset_sync 1.1.0 and fog 1.25.0. When asset_sync uploads my files to S3 and I request them back I find an empty header in the response Content-Encoding:. However when I upload them manually using S3fox, a firefox extension, this header doesn't exist.

My question is how can I disable this header from being added by asset_sync?

Notes: There are multiple issues opened at asset_sync repo on github but with no reply so far, and they closed an unsolved issue too.

Islam Azab
  • 700
  • 6
  • 22

2 Answers2

1

The problem was with the yaml file, asset_sync uses default configuration if the the yaml file had any problems.

Islam Azab
  • 700
  • 6
  • 22
  • Ah ha. I can see how that would make sense as a fallback (but that it would be easy to overlook and/or result in surprises at times). Thanks for the update. – geemus Jan 29 '15 at 20:07
0

The only related code I could see came from either setting gzip in config for asset_sync or having .gz extensions on files (see: https://github.com/rumblelabs/asset_sync/blob/3c966cd7f0cc4471459638a8772b0fda65603391/lib/asset_sync/storage.rb#L164). Is either of those the case for you? Do you have a contained reproduction case that I could look at? Thanks!

geemus
  • 2,522
  • 16
  • 22
  • I disabled asset_sync gzip feature. Assets precompile generates both versions of the file, the normal and with the extenions .gz too. I susbect that the header is wrongly modified https://github.com/rumblelabs/asset_sync/blob/3c966cd7f0cc4471459638a8772b0fda65603391/lib/asset_sync/storage.rb#L219 , I thought maybe I can remove the empty header when it is added. – Islam Azab Dec 16 '14 at 10:32
  • The problem was with the yaml file. – Islam Azab Jan 28 '15 at 18:37