diff -Nur /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-plugins/bartlby_check_http.c bartlby-plugins/bartlby_check_http.c --- /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-plugins/bartlby_check_http.c 2007-01-05 02:49:10.000000000 +0100 +++ bartlby-plugins/bartlby_check_http.c 2007-03-27 17:42:06.000000000 +0200 @@ -200,6 +200,7 @@ char * client_request; char server_return[1024]; + char fin_server_return[1024000]; struct sockaddr_in remote; struct sigaction act1, oact1; @@ -297,13 +298,10 @@ alarm(timeout); while ((b_rtc = read(c_sock, server_return, 1024))) { //printf("%d: %s\n", b_rtc, server_return); - server_return[b_rtc-1]='\0'; - if(do_regex) { - if(my_regMatch(server_return, regex) == 0) reg_matched++; - } - - sscanf(server_return, "HTTP/1.1 %d\r\n", &HTTP_code); + server_return[b_rtc]='\0'; + strcat(fin_server_return, server_return); + if(b_rtc == -1) break; //printf("%d, %s", get_request, server_return); recieved_bytes += b_rtc; @@ -321,7 +319,10 @@ close(c_sock); - + if(do_regex) { + if(my_regMatch(fin_server_return, regex) == 0) reg_matched++; + } + gettimeofday(&tv_end, NULL);