mirror of
https://github.com/apache/httpd.git
synced 2025-08-01 07:26:57 +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:
@ -1146,7 +1146,7 @@ static void test(void)
|
|||||||
apr_poll_setup(&readbits, concurrency, cntxt);
|
apr_poll_setup(&readbits, concurrency, cntxt);
|
||||||
|
|
||||||
/* setup request */
|
/* setup request */
|
||||||
if (!posting) {
|
if (posting <= 0) {
|
||||||
sprintf(request, "%s %s HTTP/1.0\r\n"
|
sprintf(request, "%s %s HTTP/1.0\r\n"
|
||||||
"User-Agent: ApacheBench/%s\r\n"
|
"User-Agent: ApacheBench/%s\r\n"
|
||||||
"%s" "%s" "%s"
|
"%s" "%s" "%s"
|
||||||
@ -1185,7 +1185,7 @@ static void test(void)
|
|||||||
/*
|
/*
|
||||||
* Combine headers and (optional) post file into one contineous buffer
|
* Combine headers and (optional) post file into one contineous buffer
|
||||||
*/
|
*/
|
||||||
if (posting) {
|
if (posting == 1) {
|
||||||
char *buff = (char *) malloc(postlen + reqlen + 1);
|
char *buff = (char *) malloc(postlen + reqlen + 1);
|
||||||
strcpy(buff, request);
|
strcpy(buff, request);
|
||||||
strcpy(buff + reqlen, postdata);
|
strcpy(buff + reqlen, postdata);
|
||||||
@ -1302,14 +1302,14 @@ static void test(void)
|
|||||||
static void copyright(void)
|
static void copyright(void)
|
||||||
{
|
{
|
||||||
if (!use_html) {
|
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) 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("Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf("<p>\n");
|
printf("<p>\n");
|
||||||
printf(" This is ApacheBench, Version %s <i><%s></i> apache-2.0<br>\n", AP_SERVER_BASEREVISION, "$Revision: 1.86 $");
|
printf(" This is ApacheBench, Version %s <i><%s></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) 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(" Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/<br>\n");
|
||||||
printf("</p>\n<p>\n");
|
printf("</p>\n<p>\n");
|
||||||
|
Reference in New Issue
Block a user