diff -ruN -x Makefile.in -x configure -x *~ apache_1.3.9.orig/src/support/ab.c apache_1.3.9/src/support/ab.c
--- apache_1.3.9.orig/src/support/ab.c	Thu Aug 12 13:06:28 1999
+++ apache_1.3.9/src/support/ab.c	Thu Sep  2 01:39:30 1999
@@ -97,7 +97,7 @@
  *   only an issue for loopback usage
  */
 
-#define VERSION "1.3a"
+#define VERSION "1.3a-deb"
 
 /*  -------------------------------------------------------------------- */
 
@@ -162,6 +162,12 @@
     struct timeval start, connect, done;
 };
 
+struct server {
+	struct sockaddr_in address;
+	int doclen;
+	int good, bad;
+};
+
 struct data {
     int read;			/* number of bytes read */
     int ctime;			/* time in ms to connect */
@@ -193,6 +199,7 @@
 int port = 80;			/* port number */
 
 int use_html = 0;		/* use html in the report */
+int num_hosts = 0;		/* Number of hosts in round-robin dns */
 char *tablestring;
 char *trstring;
 char *tdstring;
@@ -204,6 +211,7 @@
 int done = 0;			/* number of requests we have done */
 int doneka = 0;			/* number of keep alive connections done */
 int good = 0, bad = 0;		/* number of good and bad requests */
+int round_robin = 0;		/* Enable round_robin support */
 
 /* store error cases */
 int err_length = 0, err_conn = 0, err_except = 0;
@@ -222,7 +230,7 @@
 struct data *stats;		/* date for each request */
 
 fd_set readbits, writebits;	/* bits for select */
-struct sockaddr_in server;	/* server addr structure */
+struct server **server = NULL;	/* server addr structure */
 
 /* --------------------------------------------------------- */
 
@@ -313,6 +321,8 @@
     printf("\r                                                                           \r");
     printf("Server Software:        %s\n", servername);
     printf("Server Hostname:        %s\n", hostname);
+    if (num_hosts > 1)
+	printf("Number of Hosts:        %i\n", num_hosts);
     printf("Server Port:            %d\n", port);
     printf("\n");
     printf("Document Path:          %s\n", path);
@@ -394,6 +404,10 @@
     printf("<tr %s><th colspan=2 %s>Server Hostname:</th>"
 	   "<td colspan=2 %s>%s</td></tr>\n",
 	   trstring, tdstring, tdstring, hostname);
+    if (num_hosts > 1)
+	printf("<tr %s><th colspan=2 %s>Server Hostname:</th>"
+		"<td colspan=2 %s>%i</td></tr>\n",
+		trstring, tdstring, tdstring, num_hosts);
     printf("<tr %s><th colspan=2 %s>Server Port:</th>"
 	   "<td colspan=2 %s>%d</td></tr>\n",
 	   trstring, tdstring, tdstring, port);
@@ -506,6 +520,13 @@
 
 static void start_connect(struct connection * c)
 {
+    static int current_server = 0;
+    struct sockaddr my_server;
+
+    memcpy(&my_server, server[current_server], sizeof(struct sockaddr));
+    current_server++;
+    if(current_server >= num_hosts)
+	current_server = 0;
     c->read = 0;
     c->bread = 0;
     c->keepalive = 0;
@@ -519,7 +540,7 @@
     nonblock(c->fd);
     gettimeofday(&c->start, 0);
 
-    if (connect(c->fd, (struct sockaddr *) & server, sizeof(server)) < 0) {
+    while(connect(c->fd, &my_server, sizeof(struct sockaddr)) < 0) {
 	if (errno == EINPROGRESS) {
 	    c->state = STATE_CONNECTING;
 	    FD_SET(c->fd, &writebits);
@@ -528,10 +549,16 @@
 	else {
 	    close(c->fd);
 	    err_conn++;
+	    c->fd = socket(AF_INET, SOCK_STREAM, 0);
+	    if (c->fd < 0)
+		err("socket");
+
+	    nonblock(c->fd);
+	    gettimeofday(&c->start, 0);
+
 	    if (bad++ > 10) {
 		err("\nTest aborted after 10 failures\n\n");
 	    }
-	    start_connect(c);
 	}
     }
 
@@ -751,13 +778,24 @@
 
     {
 	/* get server information */
+	int counter;
 	struct hostent *he;
 	he = gethostbyname(hostname);
 	if (!he)
 	    err("bad hostname");
-	server.sin_family = he->h_addrtype;
-	server.sin_port = htons(port);
-	server.sin_addr.s_addr = ((unsigned long *) (he->h_addr_list[0]))[0];
+	if(round_robin) {
+	    for(num_hosts = 0; he->h_addr_list[num_hosts]; num_hosts++);
+	} else
+	    num_hosts = 1;
+	server = malloc(sizeof(struct server *) * num_hosts);
+	for(counter = 0; counter < num_hosts; counter++) {
+	    server[counter] = malloc(sizeof(struct server));
+	    server[counter]->address.sin_family = he->h_addrtype;
+	    server[counter]->address.sin_port = htons(port);
+	    server[counter]->address.sin_addr.s_addr = ((unsigned long *) (he->h_addr_list[counter]))[0];
+	    server[counter]->good = 0;
+	    server[counter]->bad = 0;
+	}
     }
 
     con = malloc(concurrency * sizeof(struct connection));
@@ -885,6 +923,7 @@
     fprintf(stderr, "Options are:\n");
     fprintf(stderr, "    -n requests     Number of requests to perform\n");
     fprintf(stderr, "    -c concurrency  Number of multiple requests to make\n");
+    fprintf(stderr, "    -r              Enable round-robin dns support\n");
     fprintf(stderr, "    -t timelimit    Seconds to max. wait for responses\n");
     fprintf(stderr, "    -p postfile     File containg data to POST\n");
     fprintf(stderr, "    -T content-type Content-type header for POSTing\n");
@@ -983,7 +1022,7 @@
     auth[0] = '\0';
     hdrs[0] = '\0';
     optind = 1;
-    while ((c = getopt(argc, argv, "n:c:t:T:p:v:kVhwx:y:z:C:H:P:A:")) > 0) {
+    while ((c = getopt(argc, argv, "n:c:t:T:p:v:rkVhwx:y:z:C:H:P:A:")) > 0) {
 	switch (c) {
 	case 'n':
 	    requests = atoi(optarg);
@@ -1054,6 +1093,9 @@
 	case 'V':
 	    copyright();
 	    exit(0);
+	    break;
+	case 'r':
+	    round_robin = 1;
 	    break;
 	case 'w':
 	    use_html = 1;
