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.
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