Akamai is unable to cache images via the Origin Pull mode with the FarFuture expiration module. Akamai cannot cache images that have "Vary: Accept-Encoding" header set without a "Content-Encoding: gzip" set as well. The gzip header is reserved for non-image files, however the vary header applies to all files. Look here for more info http://itway.kayako.com/index.php?/Knowledgebase/Article/View/5

The appropriate solution is to only apply Vary: Accept-Encoding to gzippable files, otherwise not set it

#1 cdn-moved-vary-accept-encoding-2213429-1.patch1.17 KBmcpuddin
PASSED: [[SimpleTest]]: [MySQL] 57 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


mcpuddin’s picture

1.17 KB
PASSED: [[SimpleTest]]: [MySQL] 57 pass(es). View

Attached is a patch that moves the Vary: Accept-Encoding right before the Content-Encoding: gzip

Wim Leers’s picture

Status: Active » Reviewed & tested by the community

Wow, I didn't realize Akamai was this stupid.

What happened to "be liberal in what you accept"?

Patch looks great, thanks!

Shane Birley’s picture

@Wim Leers,

I just have posted this issue over on the AdvAgg module issue queue since it is that module which has been posting complaints in the status page of a test site I am trying to configure.

However, I just happened across the issue discussion here and I think the problem I am seeing is the same thing.

Wim Leers’s picture

Thank you very much, Shane! :)

However, I think it is a slightly different issue: the AdvAgg issue is about the Host header being wrong, this is about the Vary header being wrong.

Or do you have further reasons to believe this is in fact the same problem?

Wim Leers’s picture

Shane Birley’s picture


I didn't think they were the same, just similar. Thought it worth mentioning mostly for reference but it does look like the issue was entirely on the AdvAgg end -- w00t!

Wim Leers’s picture

Aha, okay :) Sorry for the confusion then. Thanks for reporting!

Wim Leers’s picture

Status: Reviewed & tested by the community » Fixed

  • Wim Leers committed a3408dc on 7.x-2.x authored by mcpuddin
    Issue #2213429 by mcpuddin: FarFuture incompatible with Akamai because...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.