libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit a50756adb1b591372e1a7673b976e0a58e9b537a
parent 06001f4ee130ac6dd47c6bd301a3c346811751c6
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon, 15 May 2023 19:49:50 +0300

tests: adopted to new libcurl API

Diffstat:
Msrc/testcurl/test_basicauth.c | 4+++-
Msrc/testcurl/test_digestauth.c | 4+++-
Msrc/testcurl/test_digestauth2.c | 4+++-
Msrc/testcurl/test_digestauth_concurrent.c | 4+++-
Msrc/testcurl/test_digestauth_emu_ext.c | 4+++-
Msrc/testcurl/test_head.c | 4+++-
Msrc/testcurl/test_parse_cookies.c | 4+++-
Msrc/testcurl/test_put_broken_len.c | 4+++-
8 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/src/testcurl/test_basicauth.c b/src/testcurl/test_basicauth.c @@ -461,7 +461,9 @@ setupCURL (void *cbc, uint16_t port, char *errbuf) CURL_HTTP_VERSION_1_1)) || /* (CURLE_OK != curl_easy_setopt (c, CURLOPT_VERBOSE, 1L)) || */ (CURLE_OK != curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L)) || -#if CURL_AT_LEAST_VERSION (7, 19, 4) +#if CURL_AT_LEAST_VERSION (7, 85, 0) + (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS_STR, "http")) || +#elif CURL_AT_LEAST_VERSION (7, 19, 4) (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP)) || #endif /* CURL_AT_LEAST_VERSION (7, 19, 4) */ #if CURL_AT_LEAST_VERSION (7, 45, 0) diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c @@ -372,7 +372,9 @@ setupCURL (void *cbc, uint16_t port) (CURLE_OK != curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1)) || (CURLE_OK != curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L)) || -#if CURL_AT_LEAST_VERSION (7, 19, 4) +#if CURL_AT_LEAST_VERSION (7, 85, 0) + (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS_STR, "http")) || +#elif CURL_AT_LEAST_VERSION (7, 19, 4) (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP)) || #endif /* CURL_AT_LEAST_VERSION (7, 19, 4) */ #if CURL_AT_LEAST_VERSION (7, 45, 0) diff --git a/src/testcurl/test_digestauth2.c b/src/testcurl/test_digestauth2.c @@ -1155,7 +1155,9 @@ setupCURL (void *cbc, uint16_t port) #ifdef _DEBUG (CURLE_OK != curl_easy_setopt (c, CURLOPT_VERBOSE, 1L)) || #endif /* _DEBUG */ -#if CURL_AT_LEAST_VERSION (7, 19, 4) +#if CURL_AT_LEAST_VERSION (7, 85, 0) + (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS_STR, "http")) || +#elif CURL_AT_LEAST_VERSION (7, 19, 4) (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP)) || #endif /* CURL_AT_LEAST_VERSION (7, 19, 4) */ #if CURL_AT_LEAST_VERSION (7, 45, 0) diff --git a/src/testcurl/test_digestauth_concurrent.c b/src/testcurl/test_digestauth_concurrent.c @@ -387,7 +387,9 @@ setupCURL (void *cbc, uint16_t port, char *errbuf) #ifdef _DEBUG (CURLE_OK != curl_easy_setopt (c, CURLOPT_VERBOSE, 1L)) || #endif /* _DEBUG */ -#if CURL_AT_LEAST_VERSION (7, 19, 4) +#if CURL_AT_LEAST_VERSION (7, 85, 0) + (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS_STR, "http")) || +#elif CURL_AT_LEAST_VERSION (7, 19, 4) (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP)) || #endif /* CURL_AT_LEAST_VERSION (7, 19, 4) */ #if CURL_AT_LEAST_VERSION (7, 45, 0) diff --git a/src/testcurl/test_digestauth_emu_ext.c b/src/testcurl/test_digestauth_emu_ext.c @@ -635,7 +635,9 @@ setupCURL (void *cbc, uint16_t port) /* (CURLE_OK != curl_easy_setopt (c, CURLOPT_VERBOSE, 1L)) || */ (CURLE_OK != curl_easy_setopt (c, CURLOPT_FAILONERROR, 0L)) || (CURLE_OK != curl_easy_setopt (c, CURLOPT_HTTPHEADER, curl_headers)) || -#if CURL_AT_LEAST_VERSION (7, 19, 4) +#if CURL_AT_LEAST_VERSION (7, 85, 0) + (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS_STR, "http")) || +#elif CURL_AT_LEAST_VERSION (7, 19, 4) (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP)) || #endif /* CURL_AT_LEAST_VERSION (7, 19, 4) */ #if CURL_AT_LEAST_VERSION (7, 45, 0) diff --git a/src/testcurl/test_head.c b/src/testcurl/test_head.c @@ -524,7 +524,9 @@ setupCURL (void *cbc, uint16_t port, #endif /* _DEBUG */ (CURLE_OK != curl_easy_setopt (c, CURLOPT_DEBUGFUNCTION, &libcurl_debug_cb)) || -#if CURL_AT_LEAST_VERSION (7, 19, 4) +#if CURL_AT_LEAST_VERSION (7, 85, 0) + (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS_STR, "http")) || +#elif CURL_AT_LEAST_VERSION (7, 19, 4) (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP)) || #endif /* CURL_AT_LEAST_VERSION (7, 19, 4) */ #if CURL_AT_LEAST_VERSION (7, 45, 0) diff --git a/src/testcurl/test_parse_cookies.c b/src/testcurl/test_parse_cookies.c @@ -1433,7 +1433,9 @@ setupCURL (void *cbc, uint16_t port) #endif /* _DEBUG */ (CURLE_OK != curl_easy_setopt (c, CURLOPT_DEBUGFUNCTION, &libcurl_debug_cb)) || -#if CURL_AT_LEAST_VERSION (7, 19, 4) +#if CURL_AT_LEAST_VERSION (7, 85, 0) + (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS_STR, "http")) || +#elif CURL_AT_LEAST_VERSION (7, 19, 4) (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP)) || #endif /* CURL_AT_LEAST_VERSION (7, 19, 4) */ #if CURL_AT_LEAST_VERSION (7, 45, 0) diff --git a/src/testcurl/test_put_broken_len.c b/src/testcurl/test_put_broken_len.c @@ -424,7 +424,9 @@ setupCURL (void *cbc, uint16_t port) #endif /* _DEBUG */ (CURLE_OK != curl_easy_setopt (c, CURLOPT_DEBUGFUNCTION, &libcurl_debug_cb)) || -#if CURL_AT_LEAST_VERSION (7, 19, 4) +#if CURL_AT_LEAST_VERSION (7, 85, 0) + (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS_STR, "http")) || +#elif CURL_AT_LEAST_VERSION (7, 19, 4) (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP)) || #endif /* CURL_AT_LEAST_VERSION (7, 19, 4) */ #if CURL_AT_LEAST_VERSION (7, 45, 0)