summaryrefslogtreecommitdiffstats
path: root/plugins/check_http.c
diff options
context:
space:
mode:
authorGerhard Lausser <gerhard.lausser@consol.de>2015-11-04 15:18:37 (GMT)
committerGerhard Lausser <gerhard.lausser@consol.de>2015-11-04 15:18:37 (GMT)
commit8727768834f6f7f27bcc0ffb465994124282f2bc (patch)
tree483ec614f83c4fb3d565d79b19b835d0afda924c /plugins/check_http.c
parentac380fd243e4eb7f0b1ace06dbdc276a3a13a9bb (diff)
downloadmonitoring-plugins-8727768834f6f7f27bcc0ffb465994124282f2bc.tar.gz
Update check_http.crefs/pull/1391/head
If a web page contains a nul character, check_http reads the complete page but --expect does not search beyond this character.
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r--plugins/check_http.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 2038f4a..a2b7624 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -1022,6 +1022,10 @@ check_http (void)
1022 microsec_firstbyte = deltime (tv_temp); 1022 microsec_firstbyte = deltime (tv_temp);
1023 elapsed_time_firstbyte = (double)microsec_firstbyte / 1.0e6; 1023 elapsed_time_firstbyte = (double)microsec_firstbyte / 1.0e6;
1024 } 1024 }
1025 while (pos = memchr(buffer, '\0', i)) {
1026 /* replace nul character with a blank */
1027 *pos = ' ';
1028 }
1025 buffer[i] = '\0'; 1029 buffer[i] = '\0';
1026 xasprintf (&full_page_new, "%s%s", full_page, buffer); 1030 xasprintf (&full_page_new, "%s%s", full_page, buffer);
1027 free (full_page); 1031 free (full_page);