aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-07-09 11:43:34 +0000
committerChristian Grothoff <christian@grothoff.org>2012-07-09 11:43:34 +0000
commit5b9d324b444dc94f6850b07e9a9d534562323731 (patch)
treef75a2a9ba7e4ca4fe751bfca5abf2733a89239c3
parenteee154c8b0da6fa536e93b08747e26ccf686d722 (diff)
downloadlibmicrohttpd-5b9d324b444dc94f6850b07e9a9d534562323731.tar.gz
libmicrohttpd-5b9d324b444dc94f6850b07e9a9d534562323731.zip
-LRN: fix url generation on MinGW32
-rw-r--r--src/testcurl/https/tls_test_common.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testcurl/https/tls_test_common.c b/src/testcurl/https/tls_test_common.c
index 7c6441f7..e9227796 100644
--- a/src/testcurl/https/tls_test_common.c
+++ b/src/testcurl/https/tls_test_common.c
@@ -276,6 +276,26 @@ gen_test_file_url (char *url, int port)
276 strerror (errno)); 276 strerror (errno));
277 ret = -1; 277 ret = -1;
278 } 278 }
279#if WINDOWS
280 {
281 int i;
282 for (i = 0; i < doc_path_len; i++)
283 {
284 if (doc_path[i] == 0)
285 break;
286 if (doc_path[i] == '\\')
287 {
288 doc_path[i] = '/';
289 }
290 if (doc_path[i] != ':')
291 continue;
292 if (i == 0)
293 break;
294 doc_path[i] = doc_path[i - 1];
295 doc_path[i - 1] = '/';
296 }
297 }
298#endif
279 /* construct url - this might use doc_path */ 299 /* construct url - this might use doc_path */
280 if (sprintf (url, "%s:%d%s/%s", "https://127.0.0.1", port, 300 if (sprintf (url, "%s:%d%s/%s", "https://127.0.0.1", port,
281 doc_path, "urlpath") < 0) 301 doc_path, "urlpath") < 0)