httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ask Bjoern Hansen <...@valueclick.com>
Subject [patch] minor fixes to ab.c
Date Tue, 16 May 2000 06:05:14 GMT

1) a typo
2) the buffer code doesn't work appropiately. Second chunk of data was
   never read. The easy fix was to just make the cbuff longer (so now we
   support headers up to 8kB, geeh)
3) if the header was corrupted we didn't increment any of the err_
   variables, resulting in a rather confusing output ("N bad responses, 0
   of each type")
4) -V is mentioned in the usage but failed with an error.


 - ask


Index: ab.c
===================================================================
RCS file: /home/cvspublic/apache-2.0/src/support/ab.c,v
retrieving revision 1.14
diff -u -d -b -w -u -r1.14 ab.c
--- ab.c	2000/05/16 03:11:13	1.14
+++ ab.c	2000/05/16 05:58:09
@@ -82,7 +82,7 @@
    **    - Cleaned up by Ralf S. Engelschall <rse@apache.org>, March 1998
    **    - POST and verbosity by Kurt Sussman <kls@merlot.com>, August 1998
    **    - HTML table output added by David N. Welton <davidw@prosa.it>, January 1999
-   **    - Added Cookie, Arbitrary header and auth support. <dirkx@webweaving.org>,
April 199
+   **    - Added Cookie, Arbitrary header and auth support. <dirkx@webweaving.org>,
April 1999
    **
  */
 
@@ -135,7 +135,7 @@
 #define STATE_CONNECTING  1
 #define STATE_READ        2
 
-#define CBUFFSIZE       512
+#define CBUFFSIZE       8192
 
 struct connection {
     ap_socket_t *aprsock;
@@ -605,6 +605,7 @@
                 /* header is in invalid or too big - close connection */
                 ap_remove_poll_socket(readbits, c->aprsock);
                 ap_close_socket(c->aprsock);
+                err_response++;
                 if (bad++ > 10) {
                     err("\nTest aborted after 10 failures\n\n");
                 }
@@ -1080,6 +1081,9 @@
 	case 'h':
 	    usage(argv[0]);
 	    break;
+	case 'V':
+	    copyright();
+	    return 0;
         }
     }
 


-- 
ask bjoern hansen - <http://www.netcetera.dk/~ask/>
more than 70M impressions per day, <http://valueclick.com>


Mime
View raw message