]> granicus.if.org Git - apache/commitdiff
when a request body is sent, just display "Total body sent"
authorJeff Trawick <trawick@apache.org>
Mon, 28 Sep 2009 20:12:31 +0000 (20:12 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 28 Sep 2009 20:12:31 +0000 (20:12 +0000)
in the summary instead of making up the past tense of an
HTTP method (POST-ed or PUT)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@819702 13f79535-47bb-0310-9956-ffa450edef68

support/ab.c

index 0da9b414295346a84d918e31e2688ce3d0a901a8..5e5e334e4ed34fa38787012f6a868ab08f5f1af4 100644 (file)
@@ -282,7 +282,6 @@ int verbosity = 0;      /* no verbosity by default */
 int recverrok = 0;      /* ok to proceed after socket receive errors */
 enum {NO_METH = 0, GET, HEAD, PUT, POST} method = NO_METH;
 const char *method_str[] = {"bug", "GET", "HEAD", "PUT", "POST"};
-const char *method_str_pasttense[] = {"bug", "bug", "bug", "PUT", "POSTed"};
 int send_body = 0;      /* non-zero if sending body with request */
 int requests = 1;       /* Number of requests to make */
 int heartbeatres = 100; /* How often do we say we're alive */
@@ -805,10 +804,7 @@ static void output_results(int sig)
         printf("Keep-Alive requests:    %d\n", doneka);
     printf("Total transferred:      %" APR_INT64_T_FMT " bytes\n", totalread);
     if (send_body)
-        printf("Total %s:%*s          %" APR_INT64_T_FMT "\n",
-               method_str_pasttense[method],
-               (int)(7 - strlen(method_str_pasttense[method])),
-               " ",
+        printf("Total body sent:        %" APR_INT64_T_FMT "\n",
                totalposted);
     printf("HTML transferred:       %" APR_INT64_T_FMT " bytes\n", totalbread);
 
@@ -1094,10 +1090,9 @@ static void output_html_results(void)
        "<td colspan=2 %s>%" APR_INT64_T_FMT " bytes</td></tr>\n",
        trstring, tdstring, tdstring, totalread);
     if (send_body)
-        printf("<tr %s><th colspan=2 %s>Total %s:</th>"
+        printf("<tr %s><th colspan=2 %s>Total body sent:</th>"
            "<td colspan=2 %s>%" APR_INT64_T_FMT "</td></tr>\n",
            trstring, tdstring,
-           method_str_pasttense[method],
            tdstring, totalposted);
     printf("<tr %s><th colspan=2 %s>HTML transferred:</th>"
        "<td colspan=2 %s>%" APR_INT64_T_FMT " bytes</td></tr>\n",