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

HTTP agent breaks with JSON over HTTP/2

XMLWordPrintable

    • Sprint 68 (Sep 2020)
    • 0.5

      Steps to reproduce:

      1. Create an HTTP agent check to a JSON file on an HTTP/2 enabled server.
      2. Set "Convert to JSON"
      3. Test the check.
      4. Notice that the JSON result is escaped.

      Explanation

      It seems Zabbix 5 now supports HTTP/2, at least on my distro (Debian 10). But HTTP/2 comes with headers in lower-case (HTTP headers are not case-sensitive). The poller checks the Content-Type header to see if the result is application/json, but this check is sensitive to casing and as the header is named content-type in HTTP/2 this fails.

      Fix should be made by doing a case-insensitive compare on this line: https://github.com/zabbix/zabbix/blob/e916b3be645f8a9a689e923fd1fed4d4816565da/src/zabbix_server/poller/checks_http.c#L171

            viktors.tjarve Viktors Tjarve
            MikeN Mike Noordermeer
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: