]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r617890 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 17 Apr 2008 14:04:49 +0000 (14:04 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 17 Apr 2008 14:04:49 +0000 (14:04 +0000)
* Use a 64 bit unsigned int instead of a signed long to count the bytes
  transferred to avoid integer overflows.

PR: 44346

Submitted by: rpluem
Reviewed by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@649114 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
support/ab.c

diff --git a/CHANGES b/CHANGES
index eb13ec3fe2f26749d23e0693fd477aa18f122bdc..3c44a87cba3ad8c800a34f1ae3841518a52a4d2d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.9
 
+  *) ab: Use a 64 bit unsigned int instead of a signed long to count the
+     bytes transferred to avoid integer overflows. PR 44346 [Ruediger Pluem]
+
   *) ProxyPassReverse is now balancer aware. [Jim Jagielski]
 
   *) mod_include: Correctly handle SSI directives split over multiple filter
diff --git a/STATUS b/STATUS
index 9f5811f2764592fc67f7fdb0d75f30e2cd7aae1a..9434ae3334873f10d8d6da691815a63a96c180dc 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -88,15 +88,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
- * ab: Use a 64 bit unsigned int instead of a signed long to count the
-   bytes transferred to avoid integer overflows
-   PR: 44346
-      Trunk version of patch:
-         http://svn.apache.org/viewvc?rev=617890&view=rev
-      Backport version for 2.2.x of patch:
-         Trunk version of patch works
-    +1: rpluem, jim, covener
-
  * ab: ab very poor performance with both -k and -i cmdline options specified
     PR34275
     Trunk version of patch:
index 5adf5a5b1aac97e22c084093ec545d33f64a3bc5..fb191e54a20c6038c4e1d696e1b704ad6d956656 100644 (file)
@@ -300,9 +300,9 @@ const char *tdstring;
 
 apr_size_t doclen = 0;      /* the length the document should be */
 long started = 0;           /* number of requests started, so no excess */
-long totalread = 0;         /* total number of bytes read */
-long totalbread = 0;        /* totoal amount of entity body read */
-long totalposted = 0;       /* total number of bytes posted, inc. headers */
+apr_uint64_t totalread = 0;         /* total number of bytes read */
+apr_uint64_t totalbread = 0;        /* totoal amount of entity body read */
+apr_uint64_t totalposted = 0;       /* total number of bytes posted, inc. headers */
 long done = 0;              /* number of requests we have done */
 long doneka = 0;            /* number of keep alive connections done */
 long good = 0, bad = 0;     /* number of good and bad requests */
@@ -760,10 +760,10 @@ static void output_results(void)
         printf("Non-2xx responses:      %d\n", err_response);
     if (keepalive)
         printf("Keep-Alive requests:    %ld\n", doneka);
-    printf("Total transferred:      %ld bytes\n", totalread);
+    printf("Total transferred:      %" APR_UINT64_T_FMT " bytes\n", totalread);
     if (posting > 0)
-        printf("Total POSTed:           %ld\n", totalposted);
-    printf("HTML transferred:       %ld bytes\n", totalbread);
+        printf("Total POSTed:           %" APR_UINT64_T_FMT "\n", totalposted);
+    printf("HTML transferred:       %" APR_UINT64_T_FMT " bytes\n", totalbread);
 
     /* avoid divide by zero */
     if (timetaken) {
@@ -1028,14 +1028,14 @@ static void output_html_results(void)
            "<td colspan=2 %s>%ld</td></tr>\n",
            trstring, tdstring, tdstring, doneka);
     printf("<tr %s><th colspan=2 %s>Total transferred:</th>"
-       "<td colspan=2 %s>%ld bytes</td></tr>\n",
+       "<td colspan=2 %s>%" APR_UINT64_T_FMT " bytes</td></tr>\n",
        trstring, tdstring, tdstring, totalread);
     if (posting > 0)
         printf("<tr %s><th colspan=2 %s>Total POSTed:</th>"
-           "<td colspan=2 %s>%ld</td></tr>\n",
+           "<td colspan=2 %s>%" APR_UINT64_T_FMT "</td></tr>\n",
            trstring, tdstring, tdstring, totalposted);
     printf("<tr %s><th colspan=2 %s>HTML transferred:</th>"
-       "<td colspan=2 %s>%ld bytes</td></tr>\n",
+       "<td colspan=2 %s>%" APR_UINT64_T_FMT " bytes</td></tr>\n",
        trstring, tdstring, tdstring, totalbread);
 
     /* avoid divide by zero */