Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am implementing an additional response filter to add an extra Vary rule and noticed that I can not append the new header to the already set Vary: X-Authcache-Key. The reason is that $append is hardcoded in the internal call:
class AuthcacheP13nDefaultCoreService implements AuthcacheP13nCoreServiceInterface {
public function drupalAddHttpHeader($name, $value, $append = FALSE) {
// Right here...
drupal_add_http_header($name, $value, $append = FALSE);
}
// ...
}
I expected AuthcacheP13nDefaultCoreService to just be a OOP wrapper for core functions, but it's already making an assumption here. IMO, it's best is to just pass whatever it got from the caller for $append.
Comments
Comment #2
jedihe CreditAttribution: jedihe as a volunteer commentedComment #3
jedihe CreditAttribution: jedihe as a volunteer commentedPatch attached.
Comment #4
znerol CreditAttribution: znerol commentedThat looks like a stupid copy-paste error. Thanks a lot for tracking that down.
Setting to needs review in order to trigger a test-run.
Comment #6
znerol CreditAttribution: znerol commented