Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-12666

Fix ETag support in jsLoader.php

    XMLWordPrintable

    Details

    • Type: Patch request
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.4.1
    • Component/s: Frontend (F)
    • Labels:
      None
    • Environment:
      CentOS 7, zabbix 3.4.1, php-fpm 7.1, nginx 1.12.1 with gzip compression enabled
    • Team:
      Team B
    • Sprint:
      Sprint 17, Sprint 18, Sprint 19
    • Story Points:
      0.5

      Description

      I use zabbix 3.4.1 with nginx and gzip compression. jsLoader.php responses are compressed, but they cannot be cached by browser due to 2 cross-dependant reasons:
      1) ETag header value is malformed in jsLoader.php, it should be quoted with double quotes, see https://tools.ietf.org/html/rfc7232#section-2.3 . Nginx removes such malformed ETag header during compression, see https://github.com/nginx/nginx/blob/3d42fcd6d004a6875d474becec5d6d91a16e4e07/src/http/ngx_http_core_module.c#L1855
      2) jsLoader.php ETag verification doesn't support weak ETag value, which is used by nginx instead of ETag after gzip compression.

      Please check attached patch, it works in my tests.

        Attachments

          Activity

            People

            Assignee:
            gcalenko Gregory Chalenko
            Reporter:
            av Alex Vorona
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: