diff options
author | nikita <nikita@NetBSD.org> | 2021-01-13 00:53:52 +0100 |
---|---|---|
committer | nikita <nikita@NetBSD.org> | 2021-01-13 00:53:52 +0100 |
commit | 5b9f8acdda96cbaf7ec070db3ae9bdbe2a42f8eb (patch) | |
tree | d69e840805484efba1885154b855bf93409248cb /tests/unit/unit1654.c | |
parent | 7bd28f37397837d72302550e43d95060413e9eb8 (diff) | |
parent | e052859759b34d0e05ce0f17244873e5cd7b457b (diff) | |
download | gnurl-5b9f8acdda96cbaf7ec070db3ae9bdbe2a42f8eb.tar.gz gnurl-5b9f8acdda96cbaf7ec070db3ae9bdbe2a42f8eb.tar.bz2 gnurl-5b9f8acdda96cbaf7ec070db3ae9bdbe2a42f8eb.zip |
Merge tag 'curl-7_74_0'
7.74.0
Diffstat (limited to 'tests/unit/unit1654.c')
-rw-r--r-- | tests/unit/unit1654.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/unit/unit1654.c b/tests/unit/unit1654.c index 79e97631c..667551ce9 100644 --- a/tests/unit/unit1654.c +++ b/tests/unit/unit1654.c @@ -9,7 +9,7 @@ * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -36,11 +36,10 @@ unit_stop(void) curl_global_cleanup(); } -#if defined(CURL_DISABLE_HTTP) || !defined(USE_ALTSVC) +#if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_ALTSVC) UNITTEST_START { - return 0; /* nothing to do when HTTP is disabled or alt-svc support is - missing */ + return 0; /* nothing to do when HTTP or alt-svc is disabled */ } UNITTEST_STOP #else @@ -54,9 +53,10 @@ UNITTEST_START return 1; result = Curl_altsvc_load(asi, arg); if(result) { - Curl_altsvc_cleanup(asi); + Curl_altsvc_cleanup(&asi); return result; } + curl_global_init(CURL_GLOBAL_ALL); curl = curl_easy_init(); if(!curl) goto fail; @@ -111,7 +111,7 @@ UNITTEST_START result = Curl_altsvc_parse(curl, asi, "h2=\":443\", h3=\":443\"; ma = 120; persist = 1\r\n", - ALPN_h1, "curl.haxx.se", 80); + ALPN_h1, "curl.se", 80); if(result) { fprintf(stderr, "Curl_altsvc_parse(5) failed!\n"); unitfail++; @@ -120,7 +120,7 @@ UNITTEST_START /* clear that one again and decrease the counter */ result = Curl_altsvc_parse(curl, asi, "clear;\r\n", - ALPN_h1, "curl.haxx.se", 80); + ALPN_h1, "curl.se", 80); if(result) { fprintf(stderr, "Curl_altsvc_parse(6) failed!\n"); unitfail++; @@ -130,8 +130,9 @@ UNITTEST_START Curl_altsvc_save(curl, asi, outname); curl_easy_cleanup(curl); + curl_global_cleanup(); fail: - Curl_altsvc_cleanup(asi); + Curl_altsvc_cleanup(&asi); return unitfail; } UNITTEST_STOP |