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

    Details

    • Team:
      Team A
    • Sprint:
      Sprint 68 (Sep 2020)
    • Story Points:
      0.5

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: