gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated: Used "127.0.0.1" ins


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: Used "127.0.0.1" instead of "localhost" in all tests to avoid accidental try by IPv6
Date: Thu, 06 Apr 2017 21:17:12 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 58274f94 Used "127.0.0.1" instead of "localhost" in all tests to avoid 
accidental try by IPv6
58274f94 is described below

commit 58274f943df237ee608da8849969739c365dd664
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Thu Apr 6 22:10:44 2017 +0300

    Used "127.0.0.1" instead of "localhost" in all tests to avoid accidental 
try by IPv6
---
 ChangeLog                       | 5 +++++
 src/microhttpd/test_upgrade.c   | 4 ++--
 src/testzzuf/test_get.c         | 6 +++---
 src/testzzuf/test_get_chunked.c | 6 +++---
 src/testzzuf/test_long_header.c | 6 +++---
 src/testzzuf/test_post.c        | 6 +++---
 src/testzzuf/test_post_form.c   | 6 +++---
 src/testzzuf/test_put.c         | 6 +++---
 src/testzzuf/test_put_chunked.c | 6 +++---
 src/testzzuf/test_put_large.c   | 6 +++---
 10 files changed, 31 insertions(+), 26 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 50e2a592..daa20f3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Apr 06 22:14:22 MSK 2017
+       Added warning for hypothetical extra large timeout.
+       Fixed incorrect timeout calculation under extra rare conditions.
+       Fixed accidental usage of IPv6 in testsuite in specific conditions. -EG
+
 Wed Apr 05 14:14:22 MSK 2017
        Updated autoinit_funcs.h to latest upstream version with proper support 
of
        Oracle/Sun compiler. -EG
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index e96009c3..64b47e5d 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -117,14 +117,14 @@ gnutlscli_connect (int *sock,
               "--insecure",
               "-p",
               destination,
-              "localhost",
+              "127.0.0.1",
               (char *) NULL);
     }
   else if (TLS_CLI_OPENSSL == use_tls_tool)
     {
       snprintf (destination,
                 sizeof(destination),
-                "localhost:%u",
+                "127.0.0.1:%u",
                 (unsigned int) port);
       execlp ("openssl",
               "openssl",
diff --git a/src/testzzuf/test_get.c b/src/testzzuf/test_get.c
index d454769c..3ae2e89e 100644
--- a/src/testzzuf/test_get.c
+++ b/src/testzzuf/test_get.c
@@ -113,7 +113,7 @@ testInternalGet ()
     {
       fprintf (stderr, ".");
       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_FAILONERROR, 1);
@@ -157,7 +157,7 @@ testMultithreadedGet ()
     {
       fprintf (stderr, ".");
       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_FAILONERROR, 1);
@@ -218,7 +218,7 @@ testExternalGet ()
     {
       fprintf (stderr, ".");
       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_FAILONERROR, 1);
diff --git a/src/testzzuf/test_get_chunked.c b/src/testzzuf/test_get_chunked.c
index 8525928b..fecc71ce 100644
--- a/src/testzzuf/test_get_chunked.c
+++ b/src/testzzuf/test_get_chunked.c
@@ -139,7 +139,7 @@ testInternalGet ()
     {
       fprintf (stderr, ".");
       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_FAILONERROR, 1);
@@ -180,7 +180,7 @@ testMultithreadedGet ()
     {
       fprintf (stderr, ".");
       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_FAILONERROR, 1);
@@ -238,7 +238,7 @@ testExternalGet ()
     {
       fprintf (stderr, ".");
       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_FAILONERROR, 1);
diff --git a/src/testzzuf/test_long_header.c b/src/testzzuf/test_long_header.c
index 0e0fb9e2..6e3f15bf 100644
--- a/src/testzzuf/test_long_header.c
+++ b/src/testzzuf/test_long_header.c
@@ -123,8 +123,8 @@ testLongUrlGet ()
       url = malloc (VERY_LONG);
       memset (url, 'a', VERY_LONG);
       url[VERY_LONG - 1] = '\0';
-      memcpy (url, "http://localhost:11081/";,
-              strlen ("http://localhost:11081/";));
+      memcpy (url, "http://127.0.0.1:11081/";,
+              strlen ("http://127.0.0.1:11081/";));
       curl_easy_setopt (c, CURLOPT_URL, url);
       curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
       curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
@@ -188,7 +188,7 @@ testLongHeaderGet ()
       header = curl_slist_append (header, url);
 
       curl_easy_setopt (c, CURLOPT_HTTPHEADER, header);
-      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_FAILONERROR, 1);
diff --git a/src/testzzuf/test_post.c b/src/testzzuf/test_post.c
index d2c9ba85..b91de32b 100644
--- a/src/testzzuf/test_post.c
+++ b/src/testzzuf/test_post.c
@@ -169,7 +169,7 @@ testInternalPost ()
       fprintf (stderr, ".");
 
       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_POSTFIELDS, POST_DATA);
@@ -221,7 +221,7 @@ testMultithreadedPost ()
       fprintf (stderr, ".");
 
       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_POSTFIELDS, POST_DATA);
@@ -291,7 +291,7 @@ testExternalPost ()
 
 
       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);
diff --git a/src/testzzuf/test_post_form.c b/src/testzzuf/test_post_form.c
index 647e31f2..dbf22b9c 100644
--- a/src/testzzuf/test_post_form.c
+++ b/src/testzzuf/test_post_form.c
@@ -187,7 +187,7 @@ testInternalPost ()
     {
       fprintf (stderr, ".");
       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);
       pd = make_form ();
@@ -238,7 +238,7 @@ testMultithreadedPost ()
     {
       fprintf (stderr, ".");
       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);
       pd = make_form ();
@@ -306,7 +306,7 @@ testExternalPost ()
       fprintf (stderr, ".");
 
       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 ();
diff --git a/src/testzzuf/test_put.c b/src/testzzuf/test_put.c
index 85785c35..f76cde58 100644
--- a/src/testzzuf/test_put.c
+++ b/src/testzzuf/test_put.c
@@ -138,7 +138,7 @@ testInternalPut ()
     {
       fprintf (stderr, ".");
       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);
@@ -189,7 +189,7 @@ testMultithreadedPut ()
     {
       fprintf (stderr, ".");
       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);
@@ -258,7 +258,7 @@ testExternalPut ()
       fprintf (stderr, ".");
 
       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);
diff --git a/src/testzzuf/test_put_chunked.c b/src/testzzuf/test_put_chunked.c
index 40bc3f80..a1527599 100644
--- a/src/testzzuf/test_put_chunked.c
+++ b/src/testzzuf/test_put_chunked.c
@@ -144,7 +144,7 @@ testInternalPut ()
     {
       fprintf (stderr, ".");
       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);
@@ -191,7 +191,7 @@ testMultithreadedPut ()
   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);
@@ -270,7 +270,7 @@ testExternalPut ()
     {
       fprintf (stderr, ".");
       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);
diff --git a/src/testzzuf/test_put_large.c b/src/testzzuf/test_put_large.c
index 432ae712..af0d1706 100644
--- a/src/testzzuf/test_put_large.c
+++ b/src/testzzuf/test_put_large.c
@@ -153,7 +153,7 @@ testInternalPut ()
       fprintf (stderr, ".");
 
       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);
@@ -205,7 +205,7 @@ testMultithreadedPut ()
       fprintf (stderr, ".");
 
       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);
@@ -276,7 +276,7 @@ testExternalPut ()
       fprintf (stderr, ".");
 
       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);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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