diff options
author | Gerhard Lausser <gerhard.lausser@consol.de> | 2015-11-04 16:18:37 +0100 |
---|---|---|
committer | Gerhard Lausser <gerhard.lausser@consol.de> | 2015-11-04 16:18:37 +0100 |
commit | 8727768834f6f7f27bcc0ffb465994124282f2bc (patch) | |
tree | 483ec614f83c4fb3d565d79b19b835d0afda924c /plugins/check_http.c | |
parent | ac380fd243e4eb7f0b1ace06dbdc276a3a13a9bb (diff) | |
download | monitoring-plugins-8727768834f6f7f27bcc0ffb465994124282f2bc.tar.gz |
Update check_http.c
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index 2038f4a1..a2b76240 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); |