You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by br...@apache.org on 2002/01/27 07:38:25 UTC
cvs commit: httpd-2.0/support ab.c
brianp 02/01/26 22:38:25
Modified: support ab.c
Log:
Fixed segfault in "-i" mode of ab
Revision Changes Path
1.87 +4 -4 httpd-2.0/support/ab.c
Index: ab.c
===================================================================
RCS file: /home/cvs/httpd-2.0/support/ab.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- ab.c 29 Nov 2001 11:30:57 -0000 1.86
+++ ab.c 27 Jan 2002 06:38:25 -0000 1.87
@@ -1146,7 +1146,7 @@
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 @@
/*
* 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 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><%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) 1998-2001 The Apache Software Foundation, http://www.apache.org/<br>\n");
printf("</p>\n<p>\n");