gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r17112 - in libmicrohttpd/src/testcurl: . https


From: gnunet
Subject: [GNUnet-SVN] r17112 - in libmicrohttpd/src/testcurl: . https
Date: Thu, 29 Sep 2011 17:04:50 +0200

Author: grothoff
Date: 2011-09-29 17:04:50 +0200 (Thu, 29 Sep 2011)
New Revision: 17112

Modified:
   libmicrohttpd/src/testcurl/daemontest_digestauth.c
   libmicrohttpd/src/testcurl/daemontest_get.c
   libmicrohttpd/src/testcurl/daemontest_get_chunked.c
   libmicrohttpd/src/testcurl/daemontest_get_response_cleanup.c
   libmicrohttpd/src/testcurl/daemontest_get_sendfile.c
   libmicrohttpd/src/testcurl/daemontest_iplimit.c
   libmicrohttpd/src/testcurl/daemontest_large_put.c
   libmicrohttpd/src/testcurl/daemontest_long_header.c
   libmicrohttpd/src/testcurl/daemontest_parse_cookies.c
   libmicrohttpd/src/testcurl/daemontest_post.c
   libmicrohttpd/src/testcurl/daemontest_post_loop.c
   libmicrohttpd/src/testcurl/daemontest_postform.c
   libmicrohttpd/src/testcurl/daemontest_process_arguments.c
   libmicrohttpd/src/testcurl/daemontest_process_headers.c
   libmicrohttpd/src/testcurl/daemontest_put.c
   libmicrohttpd/src/testcurl/daemontest_put_chunked.c
   libmicrohttpd/src/testcurl/daemontest_termination.c
   libmicrohttpd/src/testcurl/daemontest_timeout.c
   libmicrohttpd/src/testcurl/daemontest_urlparse.c
   libmicrohttpd/src/testcurl/https/mhds_get_test_select.c
   libmicrohttpd/src/testcurl/https/tls_test_common.c
   libmicrohttpd/src/testcurl/perf_get.c
   libmicrohttpd/src/testcurl/perf_get_concurrent.c
   libmicrohttpd/src/testcurl/test_callback.c
Log:
use 127.0.0.1 instead of localhost for testcurl/*.c;
 performs far better on OS X and Solaris-style kernels

Will Bryant (<address@hidden>) writes:

On 21/09/2011, at 20:14 , Christian Grothoff wrote:

> > On the OpenIndiana performance, do you have something like 'strace' where 
> > you 
> > could monitor what's going on? Most likely the code hangs blocking in some 
> > syscall for longer than it should...

It has truss, and for the record, it showed no slow calls.

The problem turned out to be the tests using "localhost", which was picking the 
primary interface for the box, not the loopback interface.

Changing perf_get_concurrent.c to use 127.0.0.1 makes it vastly faster - it 
went from ~35 requests/sec to 12,000-15,000 requests/sec.

It makes a big difference on OS X too - from 115-140 requests/sec on my old 
macbook to 600-3600 requests/sec (variation here mainly due to the large amount 
of other stuff I have running).

Patch attached.




Modified: libmicrohttpd/src/testcurl/daemontest_digestauth.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_digestauth.c  2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_digestauth.c  2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -165,7 +165,7 @@
   if (d == NULL)
     return 1;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1337/";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1337/";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);

Modified: libmicrohttpd/src/testcurl/daemontest_get.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_get.c 2011-09-29 15:02:34 UTC (rev 
17111)
+++ libmicrohttpd/src/testcurl/daemontest_get.c 2011-09-29 15:04:50 UTC (rev 
17112)
@@ -113,7 +113,7 @@
   if (d == NULL)
     return 1;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -162,7 +162,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -212,7 +212,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -271,7 +271,7 @@
   if (d == NULL)
     return 256;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -403,7 +403,7 @@
   if (addr.sin_family != AF_INET)
     return 26214;
 
-  snprintf(buf, sizeof(buf), "http://localhost:%hu/hello_world";,
+  snprintf(buf, sizeof(buf), "http://127.0.0.1:%hu/hello_world";,
            ntohs(addr.sin_port));
 
   c = curl_easy_init ();

Modified: libmicrohttpd/src/testcurl/daemontest_get_chunked.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_get_chunked.c 2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_get_chunked.c 2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -162,7 +162,7 @@
   if (d == NULL)
     return 1;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -204,7 +204,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -247,7 +247,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -299,7 +299,7 @@
   if (d == NULL)
     return 256;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);

Modified: libmicrohttpd/src/testcurl/daemontest_get_response_cleanup.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_get_response_cleanup.c        
2011-09-29 15:02:34 UTC (rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_get_response_cleanup.c        
2011-09-29 15:04:50 UTC (rev 17112)
@@ -140,7 +140,7 @@
                         11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 1;
-  curl = fork_curl ("http://localhost:11080/";);
+  curl = fork_curl ("http://127.0.0.1:11080/";);
   sleep (1);
   kill_curl (curl);
   sleep (1);
@@ -165,11 +165,11 @@
     return 16;
   ok = 1;
   //fprintf (stderr, "Forking cURL!\n");
-  curl = fork_curl ("http://localhost:1081/";);
+  curl = fork_curl ("http://127.0.0.1:1081/";);
   sleep (1);
   kill_curl (curl);
   sleep (1);
-  curl = fork_curl ("http://localhost:1081/";);
+  curl = fork_curl ("http://127.0.0.1:1081/";);
   sleep (1);
   if (ok != 0)
     {
@@ -199,7 +199,7 @@
   if (d == NULL)
     return 64;
   ok = 1;
-  curl = fork_curl ("http://localhost:1081/";);
+  curl = fork_curl ("http://127.0.0.1:1081/";);
   sleep (1);
   kill_curl (curl);
   sleep (1);
@@ -226,7 +226,7 @@
                         1082, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
   if (d == NULL)
     return 256;
-  curl = fork_curl ("http://localhost:1082/";);
+  curl = fork_curl ("http://127.0.0.1:1082/";);
   
   start = time (NULL);
   while ((time (NULL) - start < 2))

Modified: libmicrohttpd/src/testcurl/daemontest_get_sendfile.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_get_sendfile.c        2011-09-29 
15:02:34 UTC (rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_get_sendfile.c        2011-09-29 
15:04:50 UTC (rev 17112)
@@ -121,7 +121,7 @@
   if (d == NULL)
     return 1;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11080/";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11080/";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -170,7 +170,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -220,7 +220,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -279,7 +279,7 @@
   if (d == NULL)
     return 256;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -411,7 +411,7 @@
   if (addr.sin_family != AF_INET)
     return 26214;
 
-  snprintf(buf, sizeof(buf), "http://localhost:%hu/";,
+  snprintf(buf, sizeof(buf), "http://127.0.0.1:%hu/";,
            ntohs(addr.sin_port));
 
   c = curl_easy_init ();

Modified: libmicrohttpd/src/testcurl/daemontest_iplimit.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_iplimit.c     2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_iplimit.c     2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -124,7 +124,7 @@
           cbc[i].size = 2048;
           cbc[i].pos = 0;
 
-          curl_easy_setopt (c, CURLOPT_URL, 
"http://localhost:1081/hello_world";);
+          curl_easy_setopt (c, CURLOPT_URL, 
"http://127.0.0.1:1081/hello_world";);
           curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
           curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc[i]);
           curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -222,7 +222,7 @@
           cbc[i].size = 2048;
           cbc[i].pos = 0;
 
-          curl_easy_setopt (c, CURLOPT_URL, 
"http://localhost:1081/hello_world";);
+          curl_easy_setopt (c, CURLOPT_URL, 
"http://127.0.0.1:1081/hello_world";);
           curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
           curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc[i]);
           curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);

Modified: libmicrohttpd/src/testcurl/daemontest_large_put.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_large_put.c   2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_large_put.c   2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -153,7 +153,7 @@
   if (d == NULL)
     return 1;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -211,7 +211,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -273,7 +273,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -344,7 +344,7 @@
   if (d == NULL)
     return 256;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);

Modified: libmicrohttpd/src/testcurl/daemontest_long_header.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_long_header.c 2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_long_header.c 2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -120,7 +120,7 @@
     }
   memset (url, 'a', VERY_LONG);
   url[VERY_LONG - 1] = '\0';
-  memcpy (url, "http://localhost:1080/";, strlen ("http://localhost:1080/";));
+  memcpy (url, "http://127.0.0.1:1080/";, strlen ("http://127.0.0.1:1080/";));
   curl_easy_setopt (c, CURLOPT_URL, url);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
@@ -196,7 +196,7 @@
   header = curl_slist_append (header, url);
 
   curl_easy_setopt (c, CURLOPT_HTTPHEADER, header);
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);

Modified: libmicrohttpd/src/testcurl/daemontest_parse_cookies.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_parse_cookies.c       2011-09-29 
15:02:34 UTC (rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_parse_cookies.c       2011-09-29 
15:04:50 UTC (rev 17112)
@@ -132,7 +132,7 @@
   if (d == NULL)
     return 256;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:21080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:21080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);

Modified: libmicrohttpd/src/testcurl/daemontest_post.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_post.c        2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_post.c        2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -144,7 +144,7 @@
   if (d == NULL)
     return 1;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA);
@@ -196,7 +196,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA);
@@ -249,7 +249,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA);
@@ -311,7 +311,7 @@
   if (d == NULL)
     return 256;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA);
@@ -516,7 +516,7 @@
   crbc.pos = 0;
   
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, (flags & FLAG_SLOW_READ) ? 
&slowReadBuffer : &readBuffer);

Modified: libmicrohttpd/src/testcurl/daemontest_post_loop.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_post_loop.c   2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_post_loop.c   2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -122,7 +122,7 @@
       c = curl_easy_init ();
       cbc.pos = 0;
       buf[0] = '\0';
-      sprintf (url, "http://localhost:1080/hw%d";, i);
+      sprintf (url, "http://127.0.0.1:1080/hw%d";, i);
       curl_easy_setopt (c, CURLOPT_URL, url);
       curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
       curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
@@ -186,7 +186,7 @@
       c = curl_easy_init ();
       cbc.pos = 0;
       buf[0] = '\0';
-      sprintf (url, "http://localhost:1081/hw%d";, i);
+      sprintf (url, "http://127.0.0.1:1081/hw%d";, i);
       curl_easy_setopt (c, CURLOPT_URL, url);
       curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
       curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
@@ -251,7 +251,7 @@
       c = curl_easy_init ();
       cbc.pos = 0;
       buf[0] = '\0';
-      sprintf (url, "http://localhost:1081/hw%d";, i);
+      sprintf (url, "http://127.0.0.1:1081/hw%d";, i);
       curl_easy_setopt (c, CURLOPT_URL, url);
       curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
       curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
@@ -333,7 +333,7 @@
       c = curl_easy_init ();
       cbc.pos = 0;
       buf[0] = '\0';
-      sprintf (url, "http://localhost:1082/hw%d";, i);
+      sprintf (url, "http://127.0.0.1:1082/hw%d";, i);
       curl_easy_setopt (c, CURLOPT_URL, url);
       curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
       curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);

Modified: libmicrohttpd/src/testcurl/daemontest_postform.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_postform.c    2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_postform.c    2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -161,7 +161,7 @@
   if (d == NULL)
     return 1;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   pd = make_form ();
@@ -215,7 +215,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   pd = make_form ();
@@ -270,7 +270,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   pd = make_form ();
@@ -334,7 +334,7 @@
   if (d == NULL)
     return 256;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   pd = make_form ();

Modified: libmicrohttpd/src/testcurl/daemontest_process_arguments.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_process_arguments.c   2011-09-29 
15:02:34 UTC (rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_process_arguments.c   2011-09-29 
15:04:50 UTC (rev 17112)
@@ -126,7 +126,7 @@
     return 256;
   c = curl_easy_init ();
   curl_easy_setopt (c, CURLOPT_URL,
-                    "http://localhost:21080/hello_world?k=v+x&hash=%23";);
+                    "http://127.0.0.1:21080/hello_world?k=v+x&hash=%23";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);

Modified: libmicrohttpd/src/testcurl/daemontest_process_headers.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_process_headers.c     2011-09-29 
15:02:34 UTC (rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_process_headers.c     2011-09-29 
15:04:50 UTC (rev 17112)
@@ -62,7 +62,7 @@
 kv_cb (void *cls, enum MHD_ValueKind kind, const char *key, const char *value)
 {
   if ((0 == strcmp (key, MHD_HTTP_HEADER_HOST)) &&
-      (0 == strcmp (value, "localhost:21080")) && (kind == MHD_HEADER_KIND))
+      (0 == strcmp (value, "127.0.0.1:21080")) && (kind == MHD_HEADER_KIND))
     {
       *((int *) cls) = 1;
       return MHD_NO;
@@ -106,7 +106,7 @@
     abort ();
   hdr = MHD_lookup_connection_value (connection,
                                      MHD_HEADER_KIND, MHD_HTTP_HEADER_HOST);
-  if ((hdr == NULL) || (0 != strcmp (hdr, "localhost:21080")))
+  if ((hdr == NULL) || (0 != strcmp (hdr, "127.0.0.1:21080")))
     abort ();
   MHD_set_connection_value (connection,
                             MHD_HEADER_KIND, "FakeHeader", "NowPresent");
@@ -155,7 +155,7 @@
   if (d == NULL)
     return 1;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:21080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:21080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -204,7 +204,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:21080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:21080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -254,7 +254,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:21080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:21080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -313,7 +313,7 @@
   if (d == NULL)
     return 256;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:21080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:21080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);

Modified: libmicrohttpd/src/testcurl/daemontest_put.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_put.c 2011-09-29 15:02:34 UTC (rev 
17111)
+++ libmicrohttpd/src/testcurl/daemontest_put.c 2011-09-29 15:04:50 UTC (rev 
17112)
@@ -130,7 +130,7 @@
   if (d == NULL)
     return 1;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -186,7 +186,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -244,7 +244,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -312,7 +312,7 @@
   if (d == NULL)
     return 256;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);

Modified: libmicrohttpd/src/testcurl/daemontest_put_chunked.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_put_chunked.c 2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_put_chunked.c 2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -140,7 +140,7 @@
   if (d == NULL)
     return 1;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -196,7 +196,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -254,7 +254,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -322,7 +322,7 @@
   if (d == NULL)
     return 256;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11082/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11082/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);

Modified: libmicrohttpd/src/testcurl/daemontest_termination.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_termination.c 2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_termination.c 2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -98,7 +98,7 @@
   CURL *curl = curl_easy_init ();
   //curl_easy_setopt(curl, CURLOPT_POST, 1L);
   char url[255];
-  sprintf (url, "http://localhost:%d";, PORT);
+  sprintf (url, "http://127.0.0.1:%d";, PORT);
   curl_easy_setopt (curl, CURLOPT_URL, url);
   curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, write_data);
 

Modified: libmicrohttpd/src/testcurl/daemontest_timeout.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_timeout.c     2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_timeout.c     2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -144,7 +144,7 @@
   if (d == NULL)
     return 1;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -199,7 +199,7 @@
   if (d == NULL)
     return 16;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer_fail);

Modified: libmicrohttpd/src/testcurl/daemontest_urlparse.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_urlparse.c    2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/daemontest_urlparse.c    2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -136,7 +136,7 @@
   if (d == NULL)
     return 1;
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, 
"http://localhost:11080/hello_world?a=b&c=&d";);
+  curl_easy_setopt (c, CURLOPT_URL, 
"http://127.0.0.1:11080/hello_world?a=b&c=&d";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);

Modified: libmicrohttpd/src/testcurl/https/mhds_get_test_select.c
===================================================================
--- libmicrohttpd/src/testcurl/https/mhds_get_test_select.c     2011-09-29 
15:02:34 UTC (rev 17111)
+++ libmicrohttpd/src/testcurl/https/mhds_get_test_select.c     2011-09-29 
15:04:50 UTC (rev 17112)
@@ -108,7 +108,7 @@
     }
 
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "https://localhost:1082/hello_world";);
+  curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1:1082/hello_world";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
   curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
   /* TLS options */

Modified: libmicrohttpd/src/testcurl/https/tls_test_common.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_test_common.c  2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/https/tls_test_common.c  2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -277,7 +277,7 @@
       ret = -1;
     }
   /* construct url - this might use doc_path */
-  if (sprintf (url, "%s:%d%s/%s", "https://localhost";, port,
+  if (sprintf (url, "%s:%d%s/%s", "https://127.0.0.1";, port,
                doc_path, "urlpath") < 0)
     ret = -1;
 

Modified: libmicrohttpd/src/testcurl/perf_get.c
===================================================================
--- libmicrohttpd/src/testcurl/perf_get.c       2011-09-29 15:02:34 UTC (rev 
17111)
+++ libmicrohttpd/src/testcurl/perf_get.c       2011-09-29 15:04:50 UTC (rev 
17112)
@@ -181,7 +181,7 @@
   unsigned int i;
   char url[64];
 
-  sprintf(url, "http://localhost:%d/hello_world";, port);
+  sprintf(url, "http://127.0.0.1:%d/hello_world";, port);
 
   cbc.buf = buf;
   cbc.size = 2048;
@@ -240,7 +240,7 @@
   unsigned int i;
   char url[64];
 
-  sprintf(url, "http://localhost:%d/hello_world";, port);
+  sprintf(url, "http://127.0.0.1:%d/hello_world";, port);
 
   cbc.buf = buf;
   cbc.size = 2048;
@@ -298,7 +298,7 @@
   unsigned int i;
   char url[64];
 
-  sprintf(url, "http://localhost:%d/hello_world";, port);
+  sprintf(url, "http://127.0.0.1:%d/hello_world";, port);
 
   cbc.buf = buf;
   cbc.size = 2048;
@@ -366,7 +366,7 @@
   unsigned int i;
   char url[64];
 
-  sprintf(url, "http://localhost:%d/hello_world";, port);
+  sprintf(url, "http://127.0.0.1:%d/hello_world";, port);
 
   multi = NULL;
   cbc.buf = buf;

Modified: libmicrohttpd/src/testcurl/perf_get_concurrent.c
===================================================================
--- libmicrohttpd/src/testcurl/perf_get_concurrent.c    2011-09-29 15:02:34 UTC 
(rev 17111)
+++ libmicrohttpd/src/testcurl/perf_get_concurrent.c    2011-09-29 15:04:50 UTC 
(rev 17112)
@@ -163,7 +163,7 @@
   pid_t par[PAR];
   char url[64];
 
-  sprintf(url, "http://localhost:%d/hello_world";, port);
+  sprintf(url, "http://127.0.0.1:%d/hello_world";, port);
   
   ret = fork ();
   if (ret == -1) abort ();

Modified: libmicrohttpd/src/testcurl/test_callback.c
===================================================================
--- libmicrohttpd/src/testcurl/test_callback.c  2011-09-29 15:02:34 UTC (rev 
17111)
+++ libmicrohttpd/src/testcurl/test_callback.c  2011-09-29 15:04:50 UTC (rev 
17112)
@@ -105,7 +105,7 @@
                       NULL,
                       MHD_OPTION_END);
   c = curl_easy_init ();
-  curl_easy_setopt (c, CURLOPT_URL, "http://localhost:8000/";);
+  curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:8000/";);
   curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &discard_buffer);
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
   curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]