mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-23 11:17:21 -08:00
net-libs/libmicrohttpd: fix tests with curl-8.13
libcurl changed behaviour, tests needs to be adapted. Closes: https://bugs.gentoo.org/953520 Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev> Closes: https://github.com/gentoo/gentoo/pull/41572 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
From 036f8fdec2802e48e2555b2caf381bb1c565ab82 Mon Sep 17 00:00:00 2001
|
||||
From: "Evgeny Grin (Karlson2k)" <k2k@narod.ru>
|
||||
Date: Fri, 11 Apr 2025 20:13:48 +0300
|
||||
Subject: test_tricky.c: applied a minimal fix for the libcurl >= 8.13.0
|
||||
|
||||
---
|
||||
src/testcurl/test_tricky.c | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/src/testcurl/test_tricky.c b/src/testcurl/test_tricky.c
|
||||
index 8cb53a80..bcbcf1ce 100644
|
||||
--- a/src/testcurl/test_tricky.c
|
||||
+++ b/src/testcurl/test_tricky.c
|
||||
@@ -452,6 +452,11 @@ struct curlQueryParams
|
||||
CURLU *url;
|
||||
#endif /* CURL_AT_LEAST_VERSION(7, 62, 0) */
|
||||
|
||||
+#if CURL_AT_LEAST_VERSION (7, 55, 0)
|
||||
+ /* A string used as the request target directly, without modifications */
|
||||
+ const char *queryTarget;
|
||||
+#endif /* CURL_AT_LEAST_VERSION(7, 55, 0) */
|
||||
+
|
||||
/* Custom query method, NULL for default */
|
||||
const char *method;
|
||||
|
||||
@@ -520,6 +525,16 @@ curlEasyInitForTest (struct curlQueryParams *p,
|
||||
libcurlErrorExitDesc ("curl_easy_setopt() failed");
|
||||
}
|
||||
#endif /* CURL_AT_LEAST_VERSION(7, 62, 0) */
|
||||
+
|
||||
+#if CURL_AT_LEAST_VERSION (7, 55, 0)
|
||||
+ if (NULL != p->queryTarget)
|
||||
+ {
|
||||
+ if (CURLE_OK != curl_easy_setopt (c, CURLOPT_REQUEST_TARGET,
|
||||
+ p->queryTarget))
|
||||
+ libcurlErrorExitDesc ("curl_easy_setopt() failed");
|
||||
+ }
|
||||
+#endif /* CURL_AT_LEAST_VERSION(7, 55, 0) */
|
||||
+
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -738,6 +753,9 @@ performTestQueries (struct MHD_Daemon *d, uint16_t d_port,
|
||||
qParam.queryPort = d_port;
|
||||
qParam.method = NULL; /* Use libcurl default: GET */
|
||||
qParam.queryPath = URL_SCHEME_HOST EXPECTED_URI_BASE_PATH;
|
||||
+#if CURL_AT_LEAST_VERSION (7, 55, 0)
|
||||
+ qParam.queryTarget = NULL;
|
||||
+#endif /* CURL_AT_LEAST_VERSION(7, 55, 0) */
|
||||
#if CURL_AT_LEAST_VERSION (7, 62, 0)
|
||||
qParam.url = NULL;
|
||||
#endif /* CURL_AT_LEAST_VERSION(7, 62, 0) */
|
||||
@@ -781,6 +799,7 @@ performTestQueries (struct MHD_Daemon *d, uint16_t d_port,
|
||||
libcurlErrorExit ();
|
||||
|
||||
qParam.queryPath = NULL;
|
||||
+ qParam.queryTarget = EXPECTED_URI_BASE_PATH_TRICKY;
|
||||
uri_cb_param->uri = EXPECTED_URI_BASE_PATH_TRICKY;
|
||||
ahc_param->rq_url = EXPECTED_URI_BASE_PATH_TRICKY;
|
||||
|
||||
--
|
||||
cgit v1.2.3
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="8"
|
||||
@@ -33,6 +33,10 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libmicrohttpd-${KEYRING_VER}
|
||||
|
||||
DOCS=( AUTHORS NEWS COPYING README ChangeLog )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.9.76-fix-test_tricky-libcurl.patch # Gentoo Bug #953520
|
||||
)
|
||||
|
||||
# All checks in libmicrohttpd's configure are correct
|
||||
# Gentoo Bug #923760
|
||||
QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="8"
|
||||
@@ -27,6 +27,10 @@ BDEPEND="ssl? ( virtual/pkgconfig )"
|
||||
|
||||
DOCS=( AUTHORS NEWS COPYING README ChangeLog )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.9.76-fix-test_tricky-libcurl.patch # Gentoo Bug #953520
|
||||
)
|
||||
|
||||
# All checks in libmicrohttpd's configure are correct
|
||||
# Gentoo Bug #923760
|
||||
QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="8"
|
||||
@@ -33,6 +33,10 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libmicrohttpd-${KEYRING_VER}
|
||||
|
||||
DOCS=( AUTHORS NEWS COPYING README ChangeLog )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.9.76-fix-test_tricky-libcurl.patch # Gentoo Bug #953520
|
||||
)
|
||||
|
||||
# All checks in libmicrohttpd's configure are correct
|
||||
# Gentoo Bug #923760
|
||||
QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="8"
|
||||
@@ -27,6 +27,10 @@ BDEPEND="ssl? ( virtual/pkgconfig )"
|
||||
|
||||
DOCS=( AUTHORS NEWS COPYING README ChangeLog )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.9.76-fix-test_tricky-libcurl.patch # Gentoo Bug #953520
|
||||
)
|
||||
|
||||
# All checks in libmicrohttpd's configure are correct
|
||||
# Gentoo Bug #923760
|
||||
QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
|
||||
Reference in New Issue
Block a user