1
0
mirror of https://github.com/apache/httpd.git synced 2025-07-30 20:03:10 +03:00

Fixed segfault in "-i" mode of ab

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93043 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brian Pane
2002-01-27 06:38:25 +00:00
parent 428f077b38
commit 1cfef29a33

View File

@ -1146,7 +1146,7 @@ static void test(void)
apr_poll_setup(&readbits, concurrency, cntxt);
/* setup request */
if (!posting) {
if (posting <= 0) {
sprintf(request, "%s %s HTTP/1.0\r\n"
"User-Agent: ApacheBench/%s\r\n"
"%s" "%s" "%s"
@ -1185,7 +1185,7 @@ static void test(void)
/*
* Combine headers and (optional) post file into one contineous buffer
*/
if (posting) {
if (posting == 1) {
char *buff = (char *) malloc(postlen + reqlen + 1);
strcpy(buff, request);
strcpy(buff + reqlen, postdata);
@ -1302,14 +1302,14 @@ static void test(void)
static void copyright(void)
{
if (!use_html) {
printf("This is ApacheBench, Version %s\n", AP_SERVER_BASEREVISION " <$Revision: 1.86 $> apache-2.0");
printf("This is ApacheBench, Version %s\n", AP_SERVER_BASEREVISION " <$Revision: 1.87 $> apache-2.0");
printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
printf("Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/\n");
printf("\n");
}
else {
printf("<p>\n");
printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AP_SERVER_BASEREVISION, "$Revision: 1.86 $");
printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AP_SERVER_BASEREVISION, "$Revision: 1.87 $");
printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
printf(" Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/<br>\n");
printf("</p>\n<p>\n");