]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix two bugs in ab:
authorMartin Kraemer <martin@apache.org>
Wed, 11 Apr 2001 21:23:54 +0000 (21:23 +0000)
committerMartin Kraemer <martin@apache.org>
Wed, 11 Apr 2001 21:23:54 +0000 (21:23 +0000)
1) The Host: header was not filled in correctly (it used the proxyhost,
   not the destination host), and
2) on POST requests, the wrong path was used.

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

src/support/ab.c

index 7cd7c88489b7f8155f1cff8f25c559a702fcac05..cd6f4a5539f98b0dc940a81da289c8bfd08a67b7 100644 (file)
@@ -1233,7 +1233,7 @@ static void test(void)
                (isproxy) ? fullurl : path,
                VERSION,
                keepalive ? "Connection: Keep-Alive\r\n" : "",
-               cookie, auth, proxyhost, hdrs);
+               cookie, auth, hostname, hdrs);
     }
     else {
        sprintf(request, "POST %s HTTP/1.0\r\n"
@@ -1245,11 +1245,11 @@ static void test(void)
                "Content-type: %s\r\n"
                "%s"
                "\r\n",
-               (!isproxy) ? path : url,
+               (isproxy) ? fullurl : path,
                VERSION,
                keepalive ? "Connection: Keep-Alive\r\n" : "",
                cookie, auth,
-               proxyhost, postlen,
+               hostname, postlen,
                (content_type[0]) ? content_type : "text/plain", hdrs);
     }
 
@@ -1323,14 +1323,14 @@ static void test(void)
 static void copyright(void)
 {
     if (!use_html) {
-       printf("This is ApacheBench, Version %s\n", VERSION " <$Revision: 1.48 $> apache-1.3");
+       printf("This is ApacheBench, Version %s\n", VERSION " <$Revision: 1.49 $> apache-1.3");
        printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
        printf("Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/\n");
        printf("\n");
     }
     else {
        printf("<p>\n");
-       printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-1.3<br>\n", VERSION, "$Revision: 1.48 $");
+       printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-1.3<br>\n", VERSION, "$Revision: 1.49 $");
        printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
        printf(" Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/<br>\n");
        printf("</p>\n<p>\n");