From b5b4649d1c7ef519f4c3d04a2d51486eac3453de Mon Sep 17 00:00:00 2001 From: Martin Kraemer Date: Fri, 30 Aug 2002 12:26:14 +0000 Subject: [PATCH] Leon Brocard writes: > Hello, > > I love httpd2 and I really like apachebench but using the gnuplot > output option (-g) gave me this: > > starttime seconds ctime dtime ttime wait > Thu Aug 29 12:29:31 200 1030620571362758 0 54 54 0 > > It's truncating the year. Now according to > http://apr.apache.org/docs/apr/group__APR__Time.html#a15 "Unlike > ANSI/ISO C ctime(), apr_ctime() does not include a \n", so the code > and comment in ab.c are wrong, hence my attached patch to remove them. Submitted by: Leon Brocard git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96586 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ support/ab.c | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 1ca195a65c..af32a05ec3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.41 + *) Fix "ab -g"'s truncated year: the last digit was cut off. + [Leon Brocard ] + *) mod_rewrite can now sets cookies in err_headers, uses the correct expiry date, and can now set the path as well PR 12132,12181,12172. diff --git a/support/ab.c b/support/ab.c index d6922b79b3..81926e4bd2 100644 --- a/support/ab.c +++ b/support/ab.c @@ -953,9 +953,6 @@ static void output_results(void) sttime = stats[i].starttime; (void) apr_ctime(tmstring, sttime); - tmstring[strlen(tmstring) - 1] = '\0'; /* ctime returns a - * string with a - * trailing newline */ fprintf(out, "%s\t%" APR_TIME_T_FMT "\t%" APR_TIME_T_FMT "\t%" APR_TIME_T_FMT "\t%" APR_TIME_T_FMT "\t%" APR_TIME_T_FMT "\n", tmstring, sttime, @@ -1739,14 +1736,14 @@ static void test(void) static void copyright(void) { if (!use_html) { - printf("This is ApacheBench, Version %s\n", AP_AB_BASEREVISION " <$Revision: 1.116 $> apache-2.0"); + printf("This is ApacheBench, Version %s\n", AP_AB_BASEREVISION " <$Revision: 1.117 $> apache-2.0"); printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n"); printf("Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/\n"); printf("\n"); } else { printf("

\n"); - printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AP_AB_BASEREVISION, "$Revision: 1.116 $"); + printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AP_AB_BASEREVISION, "$Revision: 1.117 $"); printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
\n"); printf(" Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
\n"); printf("

\n

\n"); -- 2.40.0