content_translation_page_attachments() adds alternate links to the html head, which is fine. However these links also end up in the response headers (I honestly don't really understand why we do that). Now, when there are too many languages (in our case, we're working with 47), varnish will crash with a 503.

-   BogoHeader     Too many headers: Vary: Accept-Encodin
-   HttpGarbage    "HTTP/1.1%00200%00OK%00%0aDate: Fri, 28 Apr 2017 12:54:20 GMT%00%0aServer: Apache/2.4.12 (Ubuntu)%00%0aX-Powered-By: PHP/5.6.20%00%0aCache-Control: must-revalidate, no-cache, private%00%0aLink: <http://127.0.0.1:6081/en/handbook>; rel="alternate"; hreflang="en"%00%0aLink: <http://12%00"
-   BerespStatus   503
-   BerespReason   Service Unavailable
-   FetchError     http format error
-   BackendClose   17 default(127.0.0.1,,80)
-   Timestamp      Beresp: 1493384064.185137 3.703384 3.703163
-   Timestamp      Error: 1493384064.185146 3.703393 0.000010
-   BerespProtocol HTTP/1.1
-   BerespStatus   503

I've altered out these alternate links for now with hook_module_implements_alter(). But we shouldn't send those to varnish IMO.

/**
 * Implements hook_module_implements_alter().
 */
function module_module_implements_alter(&$implementations, $hook) {
  if ($hook == 'page_attachments') {
    unset($implementations['content_translation']);
  }
}

Comments

swentel created an issue.