mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
Used "127.0.0.1" instead of "localhost" in all tests to avoid accidental try by IPv6
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
|
||||
curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
|
||||
|
||||
@@ -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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
|
||||
curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
|
||||
|
||||
@@ -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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
|
||||
curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
|
||||
|
||||
@@ -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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
|
||||
curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA);
|
||||
|
||||
@@ -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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
|
||||
pd = make_form ();
|
||||
|
||||
@@ -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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
|
||||
curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
|
||||
|
||||
@@ -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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
|
||||
curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
|
||||
|
||||
@@ -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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
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, ©Buffer);
|
||||
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
|
||||
curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
|
||||
|
||||
Reference in New Issue
Block a user