Details
-
Type:
Problem report
-
Status: Closed
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: 5.0.1
-
Fix Version/s: 5.0.4rc1, 5.2.0alpha3, 5.2 (plan)
-
Component/s: Proxy (P), Server (S)
-
Labels:
-
Team:Team A
-
Sprint:Sprint 68 (Sep 2020)
-
Story Points:0.5
Description
Steps to reproduce:
- Create an HTTP agent check to a JSON file on an HTTP/2 enabled server.
- Set "Convert to JSON"
- Test the check.
- 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