diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-11-12 19:52:49 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-11-12 19:52:49 +0100 |
commit | ff551c467120239f15080d33f7d529359aea077c (patch) | |
tree | ca74d68d634a20c927651c44d12504580624cae5 | |
parent | e1f2253a387715a69e7653ddd1ece2d1b7872175 (diff) | |
download | libmicrohttpd-ff551c467120239f15080d33f7d529359aea077c.tar.gz libmicrohttpd-ff551c467120239f15080d33f7d529359aea077c.zip |
From: Christian Hesse <mail@eworm.de>
Date: Thu, 8 Nov 2018 00:15:29 +0100
Subject: [PATCH 1/1] fix tests with curl
Starting with curl 7.62.0 some tests fail. The commit in question is
46e16406 [0] ("url: use the URL API internally as well").
Analyzing the changed behavior reveals that the url given to
curl_easy_setopt() with CURLOPT_URL is no longer encoded. Looking at the
documentation [1] this behavior is correct, the "parameter should be a
char * to a zero terminated string which must be URL-encoded [...]".
So let's just give a valid url...
[0] https://github.com/curl/curl/commit/46e164069d1a5230e4e64cbd2ff46c46cce056bb
[1] https://curl.haxx.se/libcurl/c/CURLOPT_URL.html
Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off: CG
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/testcurl/test_digestauth.c | 2 | ||||
-rw-r--r-- | src/testcurl/test_digestauth_with_arguments.c | 2 |
3 files changed, 5 insertions, 2 deletions
@@ -1,3 +1,6 @@ | |||
1 | Mon Nov 12 19:50:43 CET 2018 | ||
2 | Fix #5473 (test case failure due to change in libcurl). -eworm | ||
3 | |||
1 | Thu Nov 8 14:53:27 CET 2018 | 4 | Thu Nov 8 14:53:27 CET 2018 |
2 | Add MHD_create_response_from_buffer_with_free_callback. -CG | 5 | Add MHD_create_response_from_buffer_with_free_callback. -CG |
3 | 6 | ||
diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c index 48c7a87a..89076608 100644 --- a/src/testcurl/test_digestauth.c +++ b/src/testcurl/test_digestauth.c | |||
@@ -218,7 +218,7 @@ testDigestAuth () | |||
218 | { MHD_stop_daemon (d); return 32; } | 218 | { MHD_stop_daemon (d); return 32; } |
219 | port = (int)dinfo->port; | 219 | port = (int)dinfo->port; |
220 | } | 220 | } |
221 | sprintf(url, "http://127.0.0.1:%d/bar%%20 foo?a=bü%%20", port); | 221 | sprintf(url, "http://127.0.0.1:%d/bar%20foo%3Fkey%3Dvalue", port); |
222 | c = curl_easy_init (); | 222 | c = curl_easy_init (); |
223 | curl_easy_setopt (c, CURLOPT_URL, url); | 223 | curl_easy_setopt (c, CURLOPT_URL, url); |
224 | curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, ©Buffer); | 224 | curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, ©Buffer); |
diff --git a/src/testcurl/test_digestauth_with_arguments.c b/src/testcurl/test_digestauth_with_arguments.c index 107d2256..17d0f7a2 100644 --- a/src/testcurl/test_digestauth_with_arguments.c +++ b/src/testcurl/test_digestauth_with_arguments.c | |||
@@ -213,7 +213,7 @@ testDigestAuth () | |||
213 | { MHD_stop_daemon (d); return 32; } | 213 | { MHD_stop_daemon (d); return 32; } |
214 | port = (int)dinfo->port; | 214 | port = (int)dinfo->port; |
215 | } | 215 | } |
216 | sprintf(url, "http://127.0.0.1:%d/foo?key=value", port); | 216 | sprintf(url, "http://127.0.0.1:%d/bar%20foo%3Fkey%3Dvalue", port); |
217 | c = curl_easy_init (); | 217 | c = curl_easy_init (); |
218 | curl_easy_setopt (c, CURLOPT_URL, url); | 218 | curl_easy_setopt (c, CURLOPT_URL, url); |
219 | curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, ©Buffer); | 219 | curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, ©Buffer); |