Details

      Description

      Hi,

      In the xkey vmod documentation, keys in the pages headers must be separated by spaces and not comma.

      https://github.com/varnish/varnish-modules/blob/master/docs/vmod_xkey.rst

      "Alternatively you may instead use a single header with space separated values like xkey: 8155054 166412 234323."

      So when varnish associate the keys to the pages, instead of "content-249" we have "content-249,"

      eZPlatform is not able to purge the keys when a content is modified in BO.

      You must change the EzSystems\PlatformHttpCacheBundle\Handler\TagHandler class :

          public function addTagHeaders(Response $response, array $tags)
          {
              $tagsList = $response->headers->get($this->tagsHeader);
              $tagsList .= ' ' . implode(" ", $tags);
              $response->headers->set($this->tagsHeader, $tagsList, true);
          }
      

      Regards,
      Dominique

        Issue Links

          Activity

          Hide
          Jacek Foremski (Inactive) added a comment - - edited

          From what I gather currently PHP sends multiple "xkey" headers in this case. However, the web server is allowed to transform multiple header values into a comma-separated list (more about this: https://github.com/varnish/varnish-modules/issues/102). For example, my Apache 2.4 on Windows does this. It causes the issue described in this ticket.
          Until this is fixed in Varnish modules, we should consider sending one "xkey" header only with all the values space-separated (like in the code snippet that Dominique De Vasconcelos has provided).
          I guess VCL fix might also be possible (removing commas in xkey header).

          Show
          Jacek Foremski (Inactive) added a comment - - edited From what I gather currently PHP sends multiple "xkey" headers in this case. However, the web server is allowed to transform multiple header values into a comma-separated list (more about this: https://github.com/varnish/varnish-modules/issues/102 ). For example, my Apache 2.4 on Windows does this. It causes the issue described in this ticket. Until this is fixed in Varnish modules, we should consider sending one "xkey" header only with all the values space-separated (like in the code snippet that Dominique De Vasconcelos has provided). I guess VCL fix might also be possible (removing commas in xkey header).
          Hide
          André Rømcke added a comment -

          As we support several varnish-modules versions, we need to change to use space separated header then. Can both of you confirm it being Apache who rewrites the header to comma separated variant?

          Show
          André Rømcke added a comment - As we support several varnish-modules versions, we need to change to use space separated header then. Can both of you confirm it being Apache who rewrites the header to comma separated variant?
          Hide
          André Rømcke added a comment - - edited

          Merged: https://github.com/ezsystems/ezplatform-http-cache/commit/c69f98a64a3f8b8cebfe20a268da3cce1e87f5bf

          QA Test scope: Normal sanity checks for http cache, only change is format of the header (space separated single header instead of several headers), this is only visible when going to backend or if you enable debugging (parameters.vcl for varnish, SYMFONY_DEBUG=1 for symfony http cache proxy).

          Show
          André Rømcke added a comment - - edited Merged: https://github.com/ezsystems/ezplatform-http-cache/commit/c69f98a64a3f8b8cebfe20a268da3cce1e87f5bf QA Test scope: Normal sanity checks for http cache, only change is format of the header (space separated single header instead of several headers) , this is only visible when going to backend or if you enable debugging ( parameters.vcl for varnish, SYMFONY_DEBUG=1 for symfony http cache proxy) .
          Hide
          Pierre-Julien Cazaux added a comment -

          Hello, even if this issue is marked as fix version 1.13.1-RC1, the installation of the release do not correct the issue.Can you please provide a delivery version ? thx

          Show
          Pierre-Julien Cazaux added a comment - Hello, even if this issue is marked as fix version 1.13.1-RC1, the installation of the release do not correct the issue.Can you please provide a delivery version ? thx
          Hide
          André Rømcke added a comment -

          This was fixed in ezplatform-http-cache v0.4.2. The header changed from being individual headers which some reports said where transformed to comma seperated values by some other software, to now being a space seperated header. If you are still having issues then please report more info on your corresponding Support issue so we can be able to try to help you solve it.

          Show
          André Rømcke added a comment - This was fixed in ezplatform-http-cache v0.4.2. The header changed from being individual headers which some reports said where transformed to comma seperated values by some other software, to now being a space seperated header. If you are still having issues then please report more info on your corresponding Support issue so we can be able to try to help you solve it.

            People

            • Assignee:
              Unassigned
              Reporter:
              Dominique De Vasconcelos
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: