Skip to content

Instantly share code, notes, and snippets.

@davereid
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davereid/bd3f6b6e45634c88eb6d to your computer and use it in GitHub Desktop.
Save davereid/bd3f6b6e45634c88eb6d to your computer and use it in GitHub Desktop.

Problem:

  1. User requests /My-Page with a completely cold cache
  2. Global Redirect module says to redirect to /my-page instead with the "Case Sensitive URL Checking" enabled by default.
  3. Drupal core (patched with https://www.drupal.org/node/1678348) includes headers that allow this redirect to be cached
  4. Page cache stores the request for /My-Page with the header Location: /my-page
  5. User requests /my-page with a now-warm cache
  6. Page cache response includes header to redirect the current request to /my-page, which creates an infinite redirect loop

This happens when using both Drupal's native page cache as well as Akamai. The cache_page.cid column is a VARCHAR, which in MySQL is a non-binary string and hence, it is case-insensitive by default. Akamai by default is case-insensitive.

Possible solutions:

  • Enable case-sensitivity in Akamai's rules for storing and retrieving?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment