mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-07-15 03:41:22 -04:00
Merge pull request #1391 from lausser/patch-1
If a web page contains a nul character, check_http reads the complete page but --string does not search beyond this character.
This commit is contained in:
commit
2f845e9ebc
1 changed files with 4 additions and 0 deletions
|
|
@ -1041,6 +1041,10 @@ check_http (void)
|
|||
microsec_firstbyte = deltime (tv_temp);
|
||||
elapsed_time_firstbyte = (double)microsec_firstbyte / 1.0e6;
|
||||
}
|
||||
while (pos = memchr(buffer, '\0', i)) {
|
||||
/* replace nul character with a blank */
|
||||
*pos = ' ';
|
||||
}
|
||||
buffer[i] = '\0';
|
||||
xasprintf (&full_page_new, "%s%s", full_page, buffer);
|
||||
free (full_page);
|
||||
|
|
|
|||
Loading…
Reference in a new issue