aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-09-29 15:04:50 +0000
committerChristian Grothoff <christian@grothoff.org>2011-09-29 15:04:50 +0000
commitfe7ed03a632fb960bef5b5ba5ea23b07c8c2d397 (patch)
treee8fac5e108b15eeedaa2996d2736dada7478bde8 /src
parentb6f6b9a5cc5d2459efd18cd206e79ffa976d5a3d (diff)
downloadlibmicrohttpd-fe7ed03a632fb960bef5b5ba5ea23b07c8c2d397.tar.gz
libmicrohttpd-fe7ed03a632fb960bef5b5ba5ea23b07c8c2d397.zip
use 127.0.0.1 instead of localhost for testcurl/*.c;
performs far better on OS X and Solaris-style kernels Will Bryant (<will.bryant@gmail.com>) 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.
Diffstat (limited to 'src')
-rw-r--r--src/testcurl/daemontest_digestauth.c2
-rw-r--r--src/testcurl/daemontest_get.c10
-rw-r--r--src/testcurl/daemontest_get_chunked.c8
-rw-r--r--src/testcurl/daemontest_get_response_cleanup.c10
-rw-r--r--src/testcurl/daemontest_get_sendfile.c10
-rw-r--r--src/testcurl/daemontest_iplimit.c4
-rw-r--r--src/testcurl/daemontest_large_put.c8
-rw-r--r--src/testcurl/daemontest_long_header.c4
-rw-r--r--src/testcurl/daemontest_parse_cookies.c2
-rw-r--r--src/testcurl/daemontest_post.c10
-rw-r--r--src/testcurl/daemontest_post_loop.c8
-rw-r--r--src/testcurl/daemontest_postform.c8
-rw-r--r--src/testcurl/daemontest_process_arguments.c2
-rw-r--r--src/testcurl/daemontest_process_headers.c12
-rw-r--r--src/testcurl/daemontest_put.c8
-rw-r--r--src/testcurl/daemontest_put_chunked.c8
-rw-r--r--src/testcurl/daemontest_termination.c2
-rw-r--r--src/testcurl/daemontest_timeout.c4
-rw-r--r--src/testcurl/daemontest_urlparse.c2
-rw-r--r--src/testcurl/https/mhds_get_test_select.c2
-rw-r--r--src/testcurl/https/tls_test_common.c2
-rw-r--r--src/testcurl/perf_get.c8
-rw-r--r--src/testcurl/perf_get_concurrent.c2
-rw-r--r--src/testcurl/test_callback.c2
24 files changed, 69 insertions, 69 deletions
diff --git a/src/testcurl/daemontest_digestauth.c b/src/testcurl/daemontest_digestauth.c
index 2fa9f49e..c46cfc6b 100644
--- a/src/testcurl/daemontest_digestauth.c
+++ b/src/testcurl/daemontest_digestauth.c
@@ -165,7 +165,7 @@ testDigestAuth ()
165 if (d == NULL) 165 if (d == NULL)
166 return 1; 166 return 1;
167 c = curl_easy_init (); 167 c = curl_easy_init ();
168 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1337/"); 168 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1337/");
169 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 169 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
170 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 170 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
171 curl_easy_setopt (c, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); 171 curl_easy_setopt (c, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
diff --git a/src/testcurl/daemontest_get.c b/src/testcurl/daemontest_get.c
index ffcbbf90..b5a84eb2 100644
--- a/src/testcurl/daemontest_get.c
+++ b/src/testcurl/daemontest_get.c
@@ -113,7 +113,7 @@ testInternalGet (int poll_flag)
113 if (d == NULL) 113 if (d == NULL)
114 return 1; 114 return 1;
115 c = curl_easy_init (); 115 c = curl_easy_init ();
116 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11080/hello_world"); 116 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11080/hello_world");
117 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 117 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
118 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 118 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
119 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 119 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -162,7 +162,7 @@ testMultithreadedGet (int poll_flag)
162 if (d == NULL) 162 if (d == NULL)
163 return 16; 163 return 16;
164 c = curl_easy_init (); 164 c = curl_easy_init ();
165 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 165 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
166 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 166 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
167 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 167 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
168 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 168 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -212,7 +212,7 @@ testMultithreadedPoolGet (int poll_flag)
212 if (d == NULL) 212 if (d == NULL)
213 return 16; 213 return 16;
214 c = curl_easy_init (); 214 c = curl_easy_init ();
215 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 215 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
216 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 216 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
217 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 217 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
218 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 218 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -271,7 +271,7 @@ testExternalGet ()
271 if (d == NULL) 271 if (d == NULL)
272 return 256; 272 return 256;
273 c = curl_easy_init (); 273 c = curl_easy_init ();
274 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world"); 274 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world");
275 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 275 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
276 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 276 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
277 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 277 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -403,7 +403,7 @@ testUnknownPortGet (int poll_flag)
403 if (addr.sin_family != AF_INET) 403 if (addr.sin_family != AF_INET)
404 return 26214; 404 return 26214;
405 405
406 snprintf(buf, sizeof(buf), "http://localhost:%hu/hello_world", 406 snprintf(buf, sizeof(buf), "http://127.0.0.1:%hu/hello_world",
407 ntohs(addr.sin_port)); 407 ntohs(addr.sin_port));
408 408
409 c = curl_easy_init (); 409 c = curl_easy_init ();
diff --git a/src/testcurl/daemontest_get_chunked.c b/src/testcurl/daemontest_get_chunked.c
index fd2561ca..9d7f3c88 100644
--- a/src/testcurl/daemontest_get_chunked.c
+++ b/src/testcurl/daemontest_get_chunked.c
@@ -162,7 +162,7 @@ testInternalGet ()
162 if (d == NULL) 162 if (d == NULL)
163 return 1; 163 return 1;
164 c = curl_easy_init (); 164 c = curl_easy_init ();
165 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world"); 165 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world");
166 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 166 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
167 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 167 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
168 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 168 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -204,7 +204,7 @@ testMultithreadedGet ()
204 if (d == NULL) 204 if (d == NULL)
205 return 16; 205 return 16;
206 c = curl_easy_init (); 206 c = curl_easy_init ();
207 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 207 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
208 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 208 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
209 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 209 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
210 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 210 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -247,7 +247,7 @@ testMultithreadedPoolGet ()
247 if (d == NULL) 247 if (d == NULL)
248 return 16; 248 return 16;
249 c = curl_easy_init (); 249 c = curl_easy_init ();
250 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 250 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
251 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 251 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
252 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 252 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
253 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 253 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -299,7 +299,7 @@ testExternalGet ()
299 if (d == NULL) 299 if (d == NULL)
300 return 256; 300 return 256;
301 c = curl_easy_init (); 301 c = curl_easy_init ();
302 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world"); 302 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world");
303 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 303 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
304 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 304 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
305 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 305 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
diff --git a/src/testcurl/daemontest_get_response_cleanup.c b/src/testcurl/daemontest_get_response_cleanup.c
index d2e52e9d..e0d1a0dc 100644
--- a/src/testcurl/daemontest_get_response_cleanup.c
+++ b/src/testcurl/daemontest_get_response_cleanup.c
@@ -140,7 +140,7 @@ testInternalGet ()
140 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); 140 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
141 if (d == NULL) 141 if (d == NULL)
142 return 1; 142 return 1;
143 curl = fork_curl ("http://localhost:11080/"); 143 curl = fork_curl ("http://127.0.0.1:11080/");
144 sleep (1); 144 sleep (1);
145 kill_curl (curl); 145 kill_curl (curl);
146 sleep (1); 146 sleep (1);
@@ -165,11 +165,11 @@ testMultithreadedGet ()
165 return 16; 165 return 16;
166 ok = 1; 166 ok = 1;
167 //fprintf (stderr, "Forking cURL!\n"); 167 //fprintf (stderr, "Forking cURL!\n");
168 curl = fork_curl ("http://localhost:1081/"); 168 curl = fork_curl ("http://127.0.0.1:1081/");
169 sleep (1); 169 sleep (1);
170 kill_curl (curl); 170 kill_curl (curl);
171 sleep (1); 171 sleep (1);
172 curl = fork_curl ("http://localhost:1081/"); 172 curl = fork_curl ("http://127.0.0.1:1081/");
173 sleep (1); 173 sleep (1);
174 if (ok != 0) 174 if (ok != 0)
175 { 175 {
@@ -199,7 +199,7 @@ testMultithreadedPoolGet ()
199 if (d == NULL) 199 if (d == NULL)
200 return 64; 200 return 64;
201 ok = 1; 201 ok = 1;
202 curl = fork_curl ("http://localhost:1081/"); 202 curl = fork_curl ("http://127.0.0.1:1081/");
203 sleep (1); 203 sleep (1);
204 kill_curl (curl); 204 kill_curl (curl);
205 sleep (1); 205 sleep (1);
@@ -226,7 +226,7 @@ testExternalGet ()
226 1082, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); 226 1082, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
227 if (d == NULL) 227 if (d == NULL)
228 return 256; 228 return 256;
229 curl = fork_curl ("http://localhost:1082/"); 229 curl = fork_curl ("http://127.0.0.1:1082/");
230 230
231 start = time (NULL); 231 start = time (NULL);
232 while ((time (NULL) - start < 2)) 232 while ((time (NULL) - start < 2))
diff --git a/src/testcurl/daemontest_get_sendfile.c b/src/testcurl/daemontest_get_sendfile.c
index 622b7af2..48c543b2 100644
--- a/src/testcurl/daemontest_get_sendfile.c
+++ b/src/testcurl/daemontest_get_sendfile.c
@@ -121,7 +121,7 @@ testInternalGet ()
121 if (d == NULL) 121 if (d == NULL)
122 return 1; 122 return 1;
123 c = curl_easy_init (); 123 c = curl_easy_init ();
124 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11080/"); 124 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11080/");
125 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 125 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
126 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 126 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
127 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 127 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -170,7 +170,7 @@ testMultithreadedGet ()
170 if (d == NULL) 170 if (d == NULL)
171 return 16; 171 return 16;
172 c = curl_easy_init (); 172 c = curl_easy_init ();
173 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/"); 173 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/");
174 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 174 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
175 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 175 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
176 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 176 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -220,7 +220,7 @@ testMultithreadedPoolGet ()
220 if (d == NULL) 220 if (d == NULL)
221 return 16; 221 return 16;
222 c = curl_easy_init (); 222 c = curl_easy_init ();
223 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/"); 223 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/");
224 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 224 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
225 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 225 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
226 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 226 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -279,7 +279,7 @@ testExternalGet ()
279 if (d == NULL) 279 if (d == NULL)
280 return 256; 280 return 256;
281 c = curl_easy_init (); 281 c = curl_easy_init ();
282 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/"); 282 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/");
283 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 283 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
284 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 284 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
285 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 285 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -411,7 +411,7 @@ testUnknownPortGet ()
411 if (addr.sin_family != AF_INET) 411 if (addr.sin_family != AF_INET)
412 return 26214; 412 return 26214;
413 413
414 snprintf(buf, sizeof(buf), "http://localhost:%hu/", 414 snprintf(buf, sizeof(buf), "http://127.0.0.1:%hu/",
415 ntohs(addr.sin_port)); 415 ntohs(addr.sin_port));
416 416
417 c = curl_easy_init (); 417 c = curl_easy_init ();
diff --git a/src/testcurl/daemontest_iplimit.c b/src/testcurl/daemontest_iplimit.c
index 6b714e92..72a46055 100644
--- a/src/testcurl/daemontest_iplimit.c
+++ b/src/testcurl/daemontest_iplimit.c
@@ -124,7 +124,7 @@ testMultithreadedGet ()
124 cbc[i].size = 2048; 124 cbc[i].size = 2048;
125 cbc[i].pos = 0; 125 cbc[i].pos = 0;
126 126
127 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 127 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
128 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 128 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
129 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc[i]); 129 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc[i]);
130 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 130 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -222,7 +222,7 @@ testMultithreadedPoolGet ()
222 cbc[i].size = 2048; 222 cbc[i].size = 2048;
223 cbc[i].pos = 0; 223 cbc[i].pos = 0;
224 224
225 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 225 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
226 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 226 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
227 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc[i]); 227 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc[i]);
228 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 228 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
diff --git a/src/testcurl/daemontest_large_put.c b/src/testcurl/daemontest_large_put.c
index 3767f703..048409f9 100644
--- a/src/testcurl/daemontest_large_put.c
+++ b/src/testcurl/daemontest_large_put.c
@@ -153,7 +153,7 @@ testInternalPut ()
153 if (d == NULL) 153 if (d == NULL)
154 return 1; 154 return 1;
155 c = curl_easy_init (); 155 c = curl_easy_init ();
156 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world"); 156 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world");
157 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 157 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
158 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 158 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
159 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); 159 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -211,7 +211,7 @@ testMultithreadedPut ()
211 if (d == NULL) 211 if (d == NULL)
212 return 16; 212 return 16;
213 c = curl_easy_init (); 213 c = curl_easy_init ();
214 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 214 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
215 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 215 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
216 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 216 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
217 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); 217 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -273,7 +273,7 @@ testMultithreadedPoolPut ()
273 if (d == NULL) 273 if (d == NULL)
274 return 16; 274 return 16;
275 c = curl_easy_init (); 275 c = curl_easy_init ();
276 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 276 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
277 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 277 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
278 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 278 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
279 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); 279 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -344,7 +344,7 @@ testExternalPut ()
344 if (d == NULL) 344 if (d == NULL)
345 return 256; 345 return 256;
346 c = curl_easy_init (); 346 c = curl_easy_init ();
347 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world"); 347 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world");
348 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 348 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
349 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 349 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
350 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); 350 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
diff --git a/src/testcurl/daemontest_long_header.c b/src/testcurl/daemontest_long_header.c
index 33f2f292..a3db4b7a 100644
--- a/src/testcurl/daemontest_long_header.c
+++ b/src/testcurl/daemontest_long_header.c
@@ -120,7 +120,7 @@ testLongUrlGet ()
120 } 120 }
121 memset (url, 'a', VERY_LONG); 121 memset (url, 'a', VERY_LONG);
122 url[VERY_LONG - 1] = '\0'; 122 url[VERY_LONG - 1] = '\0';
123 memcpy (url, "http://localhost:1080/", strlen ("http://localhost:1080/")); 123 memcpy (url, "http://127.0.0.1:1080/", strlen ("http://127.0.0.1:1080/"));
124 curl_easy_setopt (c, CURLOPT_URL, url); 124 curl_easy_setopt (c, CURLOPT_URL, url);
125 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 125 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
126 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 126 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
@@ -196,7 +196,7 @@ testLongHeaderGet ()
196 header = curl_slist_append (header, url); 196 header = curl_slist_append (header, url);
197 197
198 curl_easy_setopt (c, CURLOPT_HTTPHEADER, header); 198 curl_easy_setopt (c, CURLOPT_HTTPHEADER, header);
199 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world"); 199 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world");
200 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 200 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
201 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 201 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
202 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 202 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
diff --git a/src/testcurl/daemontest_parse_cookies.c b/src/testcurl/daemontest_parse_cookies.c
index 16e0aecd..c3f75729 100644
--- a/src/testcurl/daemontest_parse_cookies.c
+++ b/src/testcurl/daemontest_parse_cookies.c
@@ -132,7 +132,7 @@ testExternalGet ()
132 if (d == NULL) 132 if (d == NULL)
133 return 256; 133 return 256;
134 c = curl_easy_init (); 134 c = curl_easy_init ();
135 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:21080/hello_world"); 135 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:21080/hello_world");
136 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 136 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
137 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 137 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
138 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 138 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
diff --git a/src/testcurl/daemontest_post.c b/src/testcurl/daemontest_post.c
index ba682cf5..f6a26b61 100644
--- a/src/testcurl/daemontest_post.c
+++ b/src/testcurl/daemontest_post.c
@@ -144,7 +144,7 @@ testInternalPost ()
144 if (d == NULL) 144 if (d == NULL)
145 return 1; 145 return 1;
146 c = curl_easy_init (); 146 c = curl_easy_init ();
147 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world"); 147 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world");
148 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 148 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
149 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 149 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
150 curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA); 150 curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA);
@@ -196,7 +196,7 @@ testMultithreadedPost ()
196 if (d == NULL) 196 if (d == NULL)
197 return 16; 197 return 16;
198 c = curl_easy_init (); 198 c = curl_easy_init ();
199 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 199 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
200 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 200 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
201 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 201 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
202 curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA); 202 curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA);
@@ -249,7 +249,7 @@ testMultithreadedPoolPost ()
249 if (d == NULL) 249 if (d == NULL)
250 return 16; 250 return 16;
251 c = curl_easy_init (); 251 c = curl_easy_init ();
252 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 252 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
253 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 253 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
254 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 254 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
255 curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA); 255 curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA);
@@ -311,7 +311,7 @@ testExternalPost ()
311 if (d == NULL) 311 if (d == NULL)
312 return 256; 312 return 256;
313 c = curl_easy_init (); 313 c = curl_easy_init ();
314 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world"); 314 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world");
315 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 315 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
316 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 316 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
317 curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA); 317 curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA);
@@ -516,7 +516,7 @@ testMultithreadedPostCancelPart(int flags)
516 crbc.pos = 0; 516 crbc.pos = 0;
517 517
518 c = curl_easy_init (); 518 c = curl_easy_init ();
519 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 519 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
520 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 520 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
521 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 521 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
522 curl_easy_setopt (c, CURLOPT_READFUNCTION, (flags & FLAG_SLOW_READ) ? &slowReadBuffer : &readBuffer); 522 curl_easy_setopt (c, CURLOPT_READFUNCTION, (flags & FLAG_SLOW_READ) ? &slowReadBuffer : &readBuffer);
diff --git a/src/testcurl/daemontest_post_loop.c b/src/testcurl/daemontest_post_loop.c
index f241744a..6a007490 100644
--- a/src/testcurl/daemontest_post_loop.c
+++ b/src/testcurl/daemontest_post_loop.c
@@ -122,7 +122,7 @@ testInternalPost ()
122 c = curl_easy_init (); 122 c = curl_easy_init ();
123 cbc.pos = 0; 123 cbc.pos = 0;
124 buf[0] = '\0'; 124 buf[0] = '\0';
125 sprintf (url, "http://localhost:1080/hw%d", i); 125 sprintf (url, "http://127.0.0.1:1080/hw%d", i);
126 curl_easy_setopt (c, CURLOPT_URL, url); 126 curl_easy_setopt (c, CURLOPT_URL, url);
127 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 127 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
128 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 128 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
@@ -186,7 +186,7 @@ testMultithreadedPost ()
186 c = curl_easy_init (); 186 c = curl_easy_init ();
187 cbc.pos = 0; 187 cbc.pos = 0;
188 buf[0] = '\0'; 188 buf[0] = '\0';
189 sprintf (url, "http://localhost:1081/hw%d", i); 189 sprintf (url, "http://127.0.0.1:1081/hw%d", i);
190 curl_easy_setopt (c, CURLOPT_URL, url); 190 curl_easy_setopt (c, CURLOPT_URL, url);
191 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 191 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
192 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 192 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
@@ -251,7 +251,7 @@ testMultithreadedPoolPost ()
251 c = curl_easy_init (); 251 c = curl_easy_init ();
252 cbc.pos = 0; 252 cbc.pos = 0;
253 buf[0] = '\0'; 253 buf[0] = '\0';
254 sprintf (url, "http://localhost:1081/hw%d", i); 254 sprintf (url, "http://127.0.0.1:1081/hw%d", i);
255 curl_easy_setopt (c, CURLOPT_URL, url); 255 curl_easy_setopt (c, CURLOPT_URL, url);
256 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 256 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
257 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 257 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
@@ -333,7 +333,7 @@ testExternalPost ()
333 c = curl_easy_init (); 333 c = curl_easy_init ();
334 cbc.pos = 0; 334 cbc.pos = 0;
335 buf[0] = '\0'; 335 buf[0] = '\0';
336 sprintf (url, "http://localhost:1082/hw%d", i); 336 sprintf (url, "http://127.0.0.1:1082/hw%d", i);
337 curl_easy_setopt (c, CURLOPT_URL, url); 337 curl_easy_setopt (c, CURLOPT_URL, url);
338 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 338 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
339 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 339 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
diff --git a/src/testcurl/daemontest_postform.c b/src/testcurl/daemontest_postform.c
index 545250ec..aa0ff17b 100644
--- a/src/testcurl/daemontest_postform.c
+++ b/src/testcurl/daemontest_postform.c
@@ -161,7 +161,7 @@ testInternalPost ()
161 if (d == NULL) 161 if (d == NULL)
162 return 1; 162 return 1;
163 c = curl_easy_init (); 163 c = curl_easy_init ();
164 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world"); 164 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world");
165 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 165 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
166 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 166 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
167 pd = make_form (); 167 pd = make_form ();
@@ -215,7 +215,7 @@ testMultithreadedPost ()
215 if (d == NULL) 215 if (d == NULL)
216 return 16; 216 return 16;
217 c = curl_easy_init (); 217 c = curl_easy_init ();
218 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 218 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
219 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 219 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
220 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 220 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
221 pd = make_form (); 221 pd = make_form ();
@@ -270,7 +270,7 @@ testMultithreadedPoolPost ()
270 if (d == NULL) 270 if (d == NULL)
271 return 16; 271 return 16;
272 c = curl_easy_init (); 272 c = curl_easy_init ();
273 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 273 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
274 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 274 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
275 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 275 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
276 pd = make_form (); 276 pd = make_form ();
@@ -334,7 +334,7 @@ testExternalPost ()
334 if (d == NULL) 334 if (d == NULL)
335 return 256; 335 return 256;
336 c = curl_easy_init (); 336 c = curl_easy_init ();
337 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world"); 337 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world");
338 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 338 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
339 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 339 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
340 pd = make_form (); 340 pd = make_form ();
diff --git a/src/testcurl/daemontest_process_arguments.c b/src/testcurl/daemontest_process_arguments.c
index 0e7edbf7..ad836509 100644
--- a/src/testcurl/daemontest_process_arguments.c
+++ b/src/testcurl/daemontest_process_arguments.c
@@ -126,7 +126,7 @@ testExternalGet ()
126 return 256; 126 return 256;
127 c = curl_easy_init (); 127 c = curl_easy_init ();
128 curl_easy_setopt (c, CURLOPT_URL, 128 curl_easy_setopt (c, CURLOPT_URL,
129 "http://localhost:21080/hello_world?k=v+x&hash=%23"); 129 "http://127.0.0.1:21080/hello_world?k=v+x&hash=%23");
130 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 130 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
131 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 131 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
132 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 132 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
diff --git a/src/testcurl/daemontest_process_headers.c b/src/testcurl/daemontest_process_headers.c
index fc0c5aef..f3ef879d 100644
--- a/src/testcurl/daemontest_process_headers.c
+++ b/src/testcurl/daemontest_process_headers.c
@@ -62,7 +62,7 @@ static int
62kv_cb (void *cls, enum MHD_ValueKind kind, const char *key, const char *value) 62kv_cb (void *cls, enum MHD_ValueKind kind, const char *key, const char *value)
63{ 63{
64 if ((0 == strcmp (key, MHD_HTTP_HEADER_HOST)) && 64 if ((0 == strcmp (key, MHD_HTTP_HEADER_HOST)) &&
65 (0 == strcmp (value, "localhost:21080")) && (kind == MHD_HEADER_KIND)) 65 (0 == strcmp (value, "127.0.0.1:21080")) && (kind == MHD_HEADER_KIND))
66 { 66 {
67 *((int *) cls) = 1; 67 *((int *) cls) = 1;
68 return MHD_NO; 68 return MHD_NO;
@@ -106,7 +106,7 @@ ahc_echo (void *cls,
106 abort (); 106 abort ();
107 hdr = MHD_lookup_connection_value (connection, 107 hdr = MHD_lookup_connection_value (connection,
108 MHD_HEADER_KIND, MHD_HTTP_HEADER_HOST); 108 MHD_HEADER_KIND, MHD_HTTP_HEADER_HOST);
109 if ((hdr == NULL) || (0 != strcmp (hdr, "localhost:21080"))) 109 if ((hdr == NULL) || (0 != strcmp (hdr, "127.0.0.1:21080")))
110 abort (); 110 abort ();
111 MHD_set_connection_value (connection, 111 MHD_set_connection_value (connection,
112 MHD_HEADER_KIND, "FakeHeader", "NowPresent"); 112 MHD_HEADER_KIND, "FakeHeader", "NowPresent");
@@ -155,7 +155,7 @@ testInternalGet ()
155 if (d == NULL) 155 if (d == NULL)
156 return 1; 156 return 1;
157 c = curl_easy_init (); 157 c = curl_easy_init ();
158 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:21080/hello_world"); 158 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:21080/hello_world");
159 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 159 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
160 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 160 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
161 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 161 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -204,7 +204,7 @@ testMultithreadedGet ()
204 if (d == NULL) 204 if (d == NULL)
205 return 16; 205 return 16;
206 c = curl_easy_init (); 206 c = curl_easy_init ();
207 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:21080/hello_world"); 207 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:21080/hello_world");
208 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 208 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
209 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 209 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
210 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 210 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -254,7 +254,7 @@ testMultithreadedPoolGet ()
254 if (d == NULL) 254 if (d == NULL)
255 return 16; 255 return 16;
256 c = curl_easy_init (); 256 c = curl_easy_init ();
257 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:21080/hello_world"); 257 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:21080/hello_world");
258 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 258 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
259 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 259 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
260 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 260 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -313,7 +313,7 @@ testExternalGet ()
313 if (d == NULL) 313 if (d == NULL)
314 return 256; 314 return 256;
315 c = curl_easy_init (); 315 c = curl_easy_init ();
316 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:21080/hello_world"); 316 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:21080/hello_world");
317 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 317 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
318 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 318 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
319 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 319 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
diff --git a/src/testcurl/daemontest_put.c b/src/testcurl/daemontest_put.c
index 1899e434..672790eb 100644
--- a/src/testcurl/daemontest_put.c
+++ b/src/testcurl/daemontest_put.c
@@ -130,7 +130,7 @@ testInternalPut ()
130 if (d == NULL) 130 if (d == NULL)
131 return 1; 131 return 1;
132 c = curl_easy_init (); 132 c = curl_easy_init ();
133 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world"); 133 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world");
134 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 134 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
135 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 135 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
136 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); 136 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -186,7 +186,7 @@ testMultithreadedPut ()
186 if (d == NULL) 186 if (d == NULL)
187 return 16; 187 return 16;
188 c = curl_easy_init (); 188 c = curl_easy_init ();
189 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 189 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
190 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 190 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
191 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 191 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
192 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); 192 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -244,7 +244,7 @@ testMultithreadedPoolPut ()
244 if (d == NULL) 244 if (d == NULL)
245 return 16; 245 return 16;
246 c = curl_easy_init (); 246 c = curl_easy_init ();
247 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1081/hello_world"); 247 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1081/hello_world");
248 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 248 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
249 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 249 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
250 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); 250 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -312,7 +312,7 @@ testExternalPut ()
312 if (d == NULL) 312 if (d == NULL)
313 return 256; 313 return 256;
314 c = curl_easy_init (); 314 c = curl_easy_init ();
315 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world"); 315 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world");
316 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 316 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
317 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 317 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
318 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); 318 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
diff --git a/src/testcurl/daemontest_put_chunked.c b/src/testcurl/daemontest_put_chunked.c
index 46c17330..fdd4cfc7 100644
--- a/src/testcurl/daemontest_put_chunked.c
+++ b/src/testcurl/daemontest_put_chunked.c
@@ -140,7 +140,7 @@ testInternalPut ()
140 if (d == NULL) 140 if (d == NULL)
141 return 1; 141 return 1;
142 c = curl_easy_init (); 142 c = curl_easy_init ();
143 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11080/hello_world"); 143 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11080/hello_world");
144 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 144 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
145 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 145 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
146 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); 146 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -196,7 +196,7 @@ testMultithreadedPut ()
196 if (d == NULL) 196 if (d == NULL)
197 return 16; 197 return 16;
198 c = curl_easy_init (); 198 c = curl_easy_init ();
199 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world"); 199 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
200 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 200 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
201 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 201 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
202 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); 202 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -254,7 +254,7 @@ testMultithreadedPoolPut ()
254 if (d == NULL) 254 if (d == NULL)
255 return 16; 255 return 16;
256 c = curl_easy_init (); 256 c = curl_easy_init ();
257 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world"); 257 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
258 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 258 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
259 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 259 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
260 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); 260 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -322,7 +322,7 @@ testExternalPut ()
322 if (d == NULL) 322 if (d == NULL)
323 return 256; 323 return 256;
324 c = curl_easy_init (); 324 c = curl_easy_init ();
325 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11082/hello_world"); 325 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11082/hello_world");
326 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 326 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
327 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 327 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
328 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); 328 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
diff --git a/src/testcurl/daemontest_termination.c b/src/testcurl/daemontest_termination.c
index 2d6ab93b..36e81fdc 100644
--- a/src/testcurl/daemontest_termination.c
+++ b/src/testcurl/daemontest_termination.c
@@ -98,7 +98,7 @@ main ()
98 CURL *curl = curl_easy_init (); 98 CURL *curl = curl_easy_init ();
99 //curl_easy_setopt(curl, CURLOPT_POST, 1L); 99 //curl_easy_setopt(curl, CURLOPT_POST, 1L);
100 char url[255]; 100 char url[255];
101 sprintf (url, "http://localhost:%d", PORT); 101 sprintf (url, "http://127.0.0.1:%d", PORT);
102 curl_easy_setopt (curl, CURLOPT_URL, url); 102 curl_easy_setopt (curl, CURLOPT_URL, url);
103 curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, write_data); 103 curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, write_data);
104 104
diff --git a/src/testcurl/daemontest_timeout.c b/src/testcurl/daemontest_timeout.c
index f3d82243..7abdaa74 100644
--- a/src/testcurl/daemontest_timeout.c
+++ b/src/testcurl/daemontest_timeout.c
@@ -144,7 +144,7 @@ testWithoutTimeout ()
144 if (d == NULL) 144 if (d == NULL)
145 return 1; 145 return 1;
146 c = curl_easy_init (); 146 c = curl_easy_init ();
147 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world"); 147 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world");
148 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 148 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
149 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 149 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
150 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer); 150 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -199,7 +199,7 @@ testWithTimeout ()
199 if (d == NULL) 199 if (d == NULL)
200 return 16; 200 return 16;
201 c = curl_easy_init (); 201 c = curl_easy_init ();
202 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1080/hello_world"); 202 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1080/hello_world");
203 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 203 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
204 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 204 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
205 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer_fail); 205 curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer_fail);
diff --git a/src/testcurl/daemontest_urlparse.c b/src/testcurl/daemontest_urlparse.c
index 9e0c9d30..39812324 100644
--- a/src/testcurl/daemontest_urlparse.c
+++ b/src/testcurl/daemontest_urlparse.c
@@ -136,7 +136,7 @@ testInternalGet (int poll_flag)
136 if (d == NULL) 136 if (d == NULL)
137 return 1; 137 return 1;
138 c = curl_easy_init (); 138 c = curl_easy_init ();
139 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11080/hello_world?a=b&c=&d"); 139 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11080/hello_world?a=b&c=&d");
140 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 140 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
141 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 141 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
142 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 142 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
diff --git a/src/testcurl/https/mhds_get_test_select.c b/src/testcurl/https/mhds_get_test_select.c
index 1ddab1d3..1a524e1f 100644
--- a/src/testcurl/https/mhds_get_test_select.c
+++ b/src/testcurl/https/mhds_get_test_select.c
@@ -108,7 +108,7 @@ testExternalGet ()
108 } 108 }
109 109
110 c = curl_easy_init (); 110 c = curl_easy_init ();
111 curl_easy_setopt (c, CURLOPT_URL, "https://localhost:1082/hello_world"); 111 curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1:1082/hello_world");
112 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 112 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
113 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 113 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
114 /* TLS options */ 114 /* TLS options */
diff --git a/src/testcurl/https/tls_test_common.c b/src/testcurl/https/tls_test_common.c
index fe71253d..140954d2 100644
--- a/src/testcurl/https/tls_test_common.c
+++ b/src/testcurl/https/tls_test_common.c
@@ -277,7 +277,7 @@ gen_test_file_url (char *url, int port)
277 ret = -1; 277 ret = -1;
278 } 278 }
279 /* construct url - this might use doc_path */ 279 /* construct url - this might use doc_path */
280 if (sprintf (url, "%s:%d%s/%s", "https://localhost", port, 280 if (sprintf (url, "%s:%d%s/%s", "https://127.0.0.1", port,
281 doc_path, "urlpath") < 0) 281 doc_path, "urlpath") < 0)
282 ret = -1; 282 ret = -1;
283 283
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c
index 31dd1177..de980e53 100644
--- a/src/testcurl/perf_get.c
+++ b/src/testcurl/perf_get.c
@@ -181,7 +181,7 @@ testInternalGet (int port, int poll_flag)
181 unsigned int i; 181 unsigned int i;
182 char url[64]; 182 char url[64];
183 183
184 sprintf(url, "http://localhost:%d/hello_world", port); 184 sprintf(url, "http://127.0.0.1:%d/hello_world", port);
185 185
186 cbc.buf = buf; 186 cbc.buf = buf;
187 cbc.size = 2048; 187 cbc.size = 2048;
@@ -240,7 +240,7 @@ testMultithreadedGet (int port, int poll_flag)
240 unsigned int i; 240 unsigned int i;
241 char url[64]; 241 char url[64];
242 242
243 sprintf(url, "http://localhost:%d/hello_world", port); 243 sprintf(url, "http://127.0.0.1:%d/hello_world", port);
244 244
245 cbc.buf = buf; 245 cbc.buf = buf;
246 cbc.size = 2048; 246 cbc.size = 2048;
@@ -298,7 +298,7 @@ testMultithreadedPoolGet (int port, int poll_flag)
298 unsigned int i; 298 unsigned int i;
299 char url[64]; 299 char url[64];
300 300
301 sprintf(url, "http://localhost:%d/hello_world", port); 301 sprintf(url, "http://127.0.0.1:%d/hello_world", port);
302 302
303 cbc.buf = buf; 303 cbc.buf = buf;
304 cbc.size = 2048; 304 cbc.size = 2048;
@@ -366,7 +366,7 @@ testExternalGet (int port)
366 unsigned int i; 366 unsigned int i;
367 char url[64]; 367 char url[64];
368 368
369 sprintf(url, "http://localhost:%d/hello_world", port); 369 sprintf(url, "http://127.0.0.1:%d/hello_world", port);
370 370
371 multi = NULL; 371 multi = NULL;
372 cbc.buf = buf; 372 cbc.buf = buf;
diff --git a/src/testcurl/perf_get_concurrent.c b/src/testcurl/perf_get_concurrent.c
index da206490..16dfccfc 100644
--- a/src/testcurl/perf_get_concurrent.c
+++ b/src/testcurl/perf_get_concurrent.c
@@ -163,7 +163,7 @@ do_gets (int port)
163 pid_t par[PAR]; 163 pid_t par[PAR];
164 char url[64]; 164 char url[64];
165 165
166 sprintf(url, "http://localhost:%d/hello_world", port); 166 sprintf(url, "http://127.0.0.1:%d/hello_world", port);
167 167
168 ret = fork (); 168 ret = fork ();
169 if (ret == -1) abort (); 169 if (ret == -1) abort ();
diff --git a/src/testcurl/test_callback.c b/src/testcurl/test_callback.c
index cd213f44..03557ed2 100644
--- a/src/testcurl/test_callback.c
+++ b/src/testcurl/test_callback.c
@@ -105,7 +105,7 @@ int main(int argc, char **argv)
105 NULL, 105 NULL,
106 MHD_OPTION_END); 106 MHD_OPTION_END);
107 c = curl_easy_init (); 107 c = curl_easy_init ();
108 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:8000/"); 108 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:8000/");
109 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &discard_buffer); 109 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &discard_buffer);
110 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 110 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
111 curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); 111 curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);