summaryrefslogtreecommitdiffstats
path: root/plugins/check_http.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r--plugins/check_http.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 0a4b12bb..5cdf144b 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -784,6 +784,7 @@ check_http (void)
784 int i = 0; 784 int i = 0;
785 size_t pagesize = 0; 785 size_t pagesize = 0;
786 char *full_page; 786 char *full_page;
787 char *full_page_new;
787 char *buf; 788 char *buf;
788 char *pos; 789 char *pos;
789 long microsec; 790 long microsec;
@@ -871,7 +872,9 @@ check_http (void)
871 full_page = strdup(""); 872 full_page = strdup("");
872 while ((i = my_recv (buffer, MAX_INPUT_BUFFER-1)) > 0) { 873 while ((i = my_recv (buffer, MAX_INPUT_BUFFER-1)) > 0) {
873 buffer[i] = '\0'; 874 buffer[i] = '\0';
874 asprintf (&full_page, "%s%s", full_page, buffer); 875 asprintf (&full_page_new, "%s%s", full_page, buffer);
876 free (full_page);
877 full_page = full_page_new;
875 pagesize += i; 878 pagesize += i;
876 879
877 if (no_body && document_headers_done (full_page)) { 880 if (no_body && document_headers_done (full_page)) {