Skip to content

Instantly share code, notes, and snippets.

@MikeN123
Created July 9, 2020 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MikeN123/6034b3314860ceb987b244f5f9a4853b to your computer and use it in GitHub Desktop.
Save MikeN123/6034b3314860ceb987b244f5f9a4853b to your computer and use it in GitHub Desktop.
--- zabbix-5.0.1.orig/src/zabbix_server/poller/checks_http.c
+++ zabbix-5.0.1/src/zabbix_server/poller/checks_http.c
@@ -168,8 +168,10 @@ static void http_output_json(unsigned ch
while (NULL != (line = zbx_http_get_header(&headers)))
{
- if (0 == json_content && 0 == strncmp(line, "Content-Type:",
- ZBX_CONST_STRLEN("Content-Type:")) &&
+ if (0 == json_content && ((0 == strncmp(line, "Content-Type:",
+ ZBX_CONST_STRLEN("Content-Type:"))) ||
+ (0 == strncmp(line, "content-type:",
+ ZBX_CONST_STRLEN("content-type:")))) &&
NULL != strstr(line, "application/json"))
{
json_content = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment