At includes/bootstrap.php:1339, drupal_serve_page_from_cache() sends out a Vary header, overriding anything previously stored in $cache->data['headers']['Vary']. By changing this line to use drupal_add_http_header() instead of simply header(), cached Vary headers will be preserved.

I have included a patch that makes the suggested change.

CommentFileSizeAuthor
drupal_serve_page_from_cache_vary.patch543 bytesspam38

Comments

spam38’s picture

Sorry, the filename should have been includes/bootstrap.inc.

Version: 7.8 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Status: Active » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.