changeset 6452:0b90d7ff0721 queues-timeout

integration mainline->queues-timeout
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 19 Nov 2025 13:11:41 +0100
parents 11f76e2aaed1 (current diff) bcf54b5d0fc3 (diff)
children 573f4394a846
files NEWS OrthancFramework/Resources/Patches/OpenSSL-ConfigureHeaders.py OrthancServer/Plugins/Include/orthanc/OrthancPluginCodeModel.json
diffstat 7 files changed, 138 insertions(+), 192 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Tue Nov 18 19:17:35 2025 +0100
+++ b/NEWS	Wed Nov 19 13:11:41 2025 +0100
@@ -61,6 +61,8 @@
 * Upgraded dependencies for static builds:
   - civetweb 1.16, including patch for CVE-2025-55763
   - SQLite 3.50.4
+  - libpng 1.6.50
+  - curl 8.17.0
 
 
 Version 1.12.9 (2025-08-11)
@@ -354,7 +356,7 @@
   an outgoing SCU connection if "DicomTlsRemoteCertificateRequired" is set to "false"
 * Fix C-Find queries not returning computed tags such as ModalitiesInStudy,
   NumberOfStudyRelatedSeries,... in very specific use cases
-* Fix C-Find queries not returning private tags in the modality worklist plugin
+* Fix C-Find queries not returning private tags in the sample modality worklist plugin
 * Fix an extremely rare error when 2 threads are trying to create the same folder
   in the File Storage at the same time
 * Fix crashes if handling very large images
@@ -613,7 +615,7 @@
 * Fix decoding of YBR_FULL RLE images for which the "Planar Configuration" 
   tag (0028,0006) equals 1
 * Made Orthanc more resilient to common spelling errors in SpecificCharacterSet
-* Modality worklists plugin: Allow searching on private tags (exact match only)
+* Sample Modality worklists plugin: Allow searching on private tags (exact match only)
 * Fix orphan files remaining in storage when working with MaximumStorageSize
   (https://discourse.orthanc-server.org/t/issue-with-deleting-incoming-dicoms-when-maximumstoragesize-is-reached/3510)
 * When deleting a resource, the "LastUpdate" metadata of its parents are now updated
--- a/OrthancFramework/Resources/CMake/LibCurlConfiguration.cmake	Tue Nov 18 19:17:35 2025 +0100
+++ b/OrthancFramework/Resources/CMake/LibCurlConfiguration.cmake	Wed Nov 19 13:11:41 2025 +0100
@@ -21,9 +21,9 @@
 
 
 if (STATIC_BUILD OR NOT USE_SYSTEM_CURL)
-  SET(CURL_SOURCES_DIR ${CMAKE_BINARY_DIR}/curl-8.9.0)
-  SET(CURL_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/curl-8.9.0.tar.gz")
-  SET(CURL_MD5 "f9bca5d4d5bac1f04e6c5eb4d0418618")
+  SET(CURL_SOURCES_DIR ${CMAKE_BINARY_DIR}/curl-8.17.0)
+  SET(CURL_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/curl-8.17.0.tar.gz")
+  SET(CURL_MD5 "71e24b00f40a7503c1d07886e42d6305")
 
   if (IS_DIRECTORY "${CURL_SOURCES_DIR}")
     set(FirstRun OFF)
@@ -36,7 +36,7 @@
   if (FirstRun)
     execute_process(
       COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
-      ${CMAKE_CURRENT_LIST_DIR}/../Patches/curl-8.9.0.patch
+      ${CMAKE_CURRENT_LIST_DIR}/../Patches/curl-8.17.0.patch
       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
       RESULT_VARIABLE Failure
       )
@@ -55,6 +55,7 @@
   AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/vssh CURL_SOURCES)
   AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/vtls CURL_SOURCES)
   AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/vquic CURL_SOURCES)
+  AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/curlx CURL_SOURCES)
   source_group(ThirdParty\\LibCurl REGULAR_EXPRESSION ${CURL_SOURCES_DIR}/.*)
 
   add_definitions(
@@ -116,79 +117,57 @@
       SOURCE ${CURL_SOURCES} APPEND
       PROPERTY COMPILE_DEFINITIONS "HAVE_CONFIG_H=1;OS=\"${TMP_OS}\""
       )
-   
+
+    if(CMAKE_C_COMPILER_TARGET)
+      set(CURL_OS "\"${CMAKE_C_COMPILER_TARGET}\"")
+    else()
+      set(CURL_OS "\"${CMAKE_SYSTEM_NAME}\"")
+    endif()
+
     include(${CURL_SOURCES_DIR}/CMake/Macros.cmake)
 
-    # WARNING: Do *not* reorder the "check_include_file_concat()" below!
-    check_include_file_concat("stdio.h"          HAVE_STDIO_H)
-    check_include_file_concat("inttypes.h"       HAVE_INTTYPES_H)
-    check_include_file_concat("sys/filio.h"      HAVE_SYS_FILIO_H)
-    check_include_file_concat("sys/ioctl.h"      HAVE_SYS_IOCTL_H)
-    check_include_file_concat("sys/param.h"      HAVE_SYS_PARAM_H)
-    check_include_file_concat("sys/poll.h"       HAVE_SYS_POLL_H)
-    check_include_file_concat("sys/resource.h"   HAVE_SYS_RESOURCE_H)
-    check_include_file_concat("sys/select.h"     HAVE_SYS_SELECT_H)
-    check_include_file_concat("sys/socket.h"     HAVE_SYS_SOCKET_H)
-    check_include_file_concat("sys/sockio.h"     HAVE_SYS_SOCKIO_H)
-    check_include_file_concat("sys/stat.h"       HAVE_SYS_STAT_H)
-    check_include_file_concat("sys/time.h"       HAVE_SYS_TIME_H)
-    check_include_file_concat("sys/types.h"      HAVE_SYS_TYPES_H)
-    check_include_file_concat("sys/uio.h"        HAVE_SYS_UIO_H)
-    check_include_file_concat("sys/un.h"         HAVE_SYS_UN_H)
-    check_include_file_concat("sys/utime.h"      HAVE_SYS_UTIME_H)
-    check_include_file_concat("sys/xattr.h"      HAVE_SYS_XATTR_H)
-    check_include_file_concat("alloca.h"         HAVE_ALLOCA_H)
-    check_include_file_concat("arpa/inet.h"      HAVE_ARPA_INET_H)
-    check_include_file_concat("arpa/tftp.h"      HAVE_ARPA_TFTP_H)
-    check_include_file_concat("assert.h"         HAVE_ASSERT_H)
-    check_include_file_concat("crypto.h"         HAVE_CRYPTO_H)
-    check_include_file_concat("des.h"            HAVE_DES_H)
-    check_include_file_concat("err.h"            HAVE_ERR_H)
-    check_include_file_concat("errno.h"          HAVE_ERRNO_H)
-    check_include_file_concat("fcntl.h"          HAVE_FCNTL_H)
-    check_include_file_concat("idn2.h"           HAVE_IDN2_H)
-    check_include_file_concat("ifaddrs.h"        HAVE_IFADDRS_H)
-    check_include_file_concat("io.h"             HAVE_IO_H)
-    check_include_file_concat("krb.h"            HAVE_KRB_H)
-    check_include_file_concat("libgen.h"         HAVE_LIBGEN_H)
-    check_include_file_concat("limits.h"         HAVE_LIMITS_H)
-    check_include_file_concat("locale.h"         HAVE_LOCALE_H)
-    check_include_file_concat("net/if.h"         HAVE_NET_IF_H)
-    check_include_file_concat("netdb.h"          HAVE_NETDB_H)
-    check_include_file_concat("netinet/in.h"     HAVE_NETINET_IN_H)
-    check_include_file_concat("netinet/tcp.h"    HAVE_NETINET_TCP_H)
+    # Detect headers
+
+    # Use check_include_file_concat_curl() for headers required by subsequent
+    # check_include_file_concat_curl() or check_symbol_exists() detections.
+    # Order for these is significant.
+    check_include_file("sys/eventfd.h"    HAVE_SYS_EVENTFD_H)
+    check_include_file("sys/filio.h"      HAVE_SYS_FILIO_H)
+    check_include_file("sys/ioctl.h"      HAVE_SYS_IOCTL_H)
+    check_include_file("sys/param.h"      HAVE_SYS_PARAM_H)
+    check_include_file("sys/poll.h"       HAVE_SYS_POLL_H)
+    check_include_file("sys/resource.h"   HAVE_SYS_RESOURCE_H)
+    check_include_file_concat_curl("sys/select.h"     HAVE_SYS_SELECT_H)
+    check_include_file("sys/sockio.h"     HAVE_SYS_SOCKIO_H)
+    check_include_file_concat_curl("sys/types.h"      HAVE_SYS_TYPES_H)
+    check_include_file("sys/un.h"         HAVE_SYS_UN_H)
+    check_include_file_concat_curl("sys/utime.h"      HAVE_SYS_UTIME_H)  # sys/types.h (AmigaOS)
 
-    check_include_file_concat("pem.h"            HAVE_PEM_H)
-    check_include_file_concat("poll.h"           HAVE_POLL_H)
-    check_include_file_concat("pwd.h"            HAVE_PWD_H)
-    check_include_file_concat("rsa.h"            HAVE_RSA_H)
-    check_include_file_concat("setjmp.h"         HAVE_SETJMP_H)
-    check_include_file_concat("sgtty.h"          HAVE_SGTTY_H)
-    check_include_file_concat("signal.h"         HAVE_SIGNAL_H)
-    check_include_file_concat("ssl.h"            HAVE_SSL_H)
-    check_include_file_concat("stdbool.h"        HAVE_STDBOOL_H)
-    check_include_file_concat("stdint.h"         HAVE_STDINT_H)
-    check_include_file_concat("stdio.h"          HAVE_STDIO_H)
-    check_include_file_concat("stdlib.h"         HAVE_STDLIB_H)
-    check_include_file_concat("string.h"         HAVE_STRING_H)
-    check_include_file_concat("strings.h"        HAVE_STRINGS_H)
-    check_include_file_concat("stropts.h"        HAVE_STROPTS_H)
-    check_include_file_concat("termio.h"         HAVE_TERMIO_H)
-    check_include_file_concat("termios.h"        HAVE_TERMIOS_H)
-    check_include_file_concat("time.h"           HAVE_TIME_H)
-    check_include_file_concat("unistd.h"         HAVE_UNISTD_H)
-    check_include_file_concat("utime.h"          HAVE_UTIME_H)
-    check_include_file_concat("x509.h"           HAVE_X509_H)
-
-    check_include_file_concat("process.h"        HAVE_PROCESS_H)
-    check_include_file_concat("stddef.h"         HAVE_STDDEF_H)
-    check_include_file_concat("dlfcn.h"          HAVE_DLFCN_H)
-    check_include_file_concat("malloc.h"         HAVE_MALLOC_H)
-    check_include_file_concat("memory.h"         HAVE_MEMORY_H)
-    check_include_file_concat("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H)
-    check_include_file_concat("stdint.h"        HAVE_STDINT_H)
-    check_include_file_concat("sockio.h"        HAVE_SOCKIO_H)
-    check_include_file_concat("sys/utsname.h"   HAVE_SYS_UTSNAME_H)
+    check_include_file_concat_curl("arpa/inet.h"      HAVE_ARPA_INET_H)
+    check_include_file("dirent.h"         HAVE_DIRENT_H)
+    check_include_file("fcntl.h"          HAVE_FCNTL_H)
+    check_include_file_concat_curl("ifaddrs.h"        HAVE_IFADDRS_H)
+    check_include_file("io.h"             HAVE_IO_H)
+    check_include_file_concat_curl("libgen.h"         HAVE_LIBGEN_H)
+    check_include_file("linux/tcp.h"      HAVE_LINUX_TCP_H)
+    check_include_file("locale.h"         HAVE_LOCALE_H)
+    check_include_file_concat_curl("net/if.h"         HAVE_NET_IF_H)  # sys/select.h (e.g. MS-DOS/Watt-32)
+    check_include_file_concat_curl("netdb.h"          HAVE_NETDB_H)
+    check_include_file_concat_curl("netinet/in.h"     HAVE_NETINET_IN_H)
+    check_include_file("netinet/in6.h"    HAVE_NETINET_IN6_H)
+    check_include_file_concat_curl("netinet/tcp.h"    HAVE_NETINET_TCP_H)  # sys/types.h (e.g. Cygwin) netinet/in.h
+    check_include_file_concat_curl("netinet/udp.h"    HAVE_NETINET_UDP_H)  # sys/types.h (e.g. Cygwin)
+    check_include_file("poll.h"           HAVE_POLL_H)
+    check_include_file("pwd.h"            HAVE_PWD_H)
+    check_include_file("stdatomic.h"      HAVE_STDATOMIC_H)
+    check_include_file("stdbool.h"        HAVE_STDBOOL_H)
+    check_include_file("stdint.h"         HAVE_STDINT_H)
+    check_include_file("strings.h"        HAVE_STRINGS_H)
+    check_include_file("stropts.h"        HAVE_STROPTS_H)
+    check_include_file("termio.h"         HAVE_TERMIO_H)
+    check_include_file("termios.h"        HAVE_TERMIOS_H)
+    check_include_file_concat_curl("unistd.h"         HAVE_UNISTD_H)
+    check_include_file("utime.h"          HAVE_UTIME_H)
 
     check_type_size("size_t"  SIZEOF_SIZE_T)
     check_type_size("ssize_t"  SIZEOF_SSIZE_T)
@@ -202,97 +181,72 @@
     check_type_size("off_t"  SIZEOF_OFF_T)
     check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T)
 
-    check_symbol_exists(basename      "${CURL_INCLUDES}" HAVE_BASENAME)
-    check_symbol_exists(socket        "${CURL_INCLUDES}" HAVE_SOCKET)
-    # poll on macOS is unreliable, it first did not exist, then was broken until
-    # fixed in 10.9 only to break again in 10.12.
-    if(NOT APPLE)
-      check_symbol_exists(poll        "${CURL_INCLUDES}" HAVE_POLL)
-    endif()
-    check_symbol_exists(select        "${CURL_INCLUDES}" HAVE_SELECT)
-    check_symbol_exists(strdup        "${CURL_INCLUDES}" HAVE_STRDUP)
-    check_symbol_exists(strstr        "${CURL_INCLUDES}" HAVE_STRSTR)
-    check_symbol_exists(strtok_r      "${CURL_INCLUDES}" HAVE_STRTOK_R)
-    check_symbol_exists(strftime      "${CURL_INCLUDES}" HAVE_STRFTIME)
-    check_symbol_exists(uname         "${CURL_INCLUDES}" HAVE_UNAME)
-    check_symbol_exists(strcasecmp    "${CURL_INCLUDES}" HAVE_STRCASECMP)
-    check_symbol_exists(stricmp       "${CURL_INCLUDES}" HAVE_STRICMP)
-    check_symbol_exists(strcmpi       "${CURL_INCLUDES}" HAVE_STRCMPI)
-    check_symbol_exists(strncmpi      "${CURL_INCLUDES}" HAVE_STRNCMPI)
-    check_symbol_exists(alarm         "${CURL_INCLUDES}" HAVE_ALARM)
-    if(NOT HAVE_STRNCMPI)
-      set(HAVE_STRCMPI)
-    endif(NOT HAVE_STRNCMPI)
+    check_function_exists("accept4"       HAVE_ACCEPT4)
+    check_function_exists("fnmatch"       HAVE_FNMATCH)
+    check_symbol_exists("basename"        "${CURL_INCLUDES};string.h" HAVE_BASENAME)  # libgen.h unistd.h
+    check_symbol_exists("opendir"         "dirent.h" HAVE_OPENDIR)
+    check_function_exists("poll"          HAVE_POLL)  # poll.h
+    check_symbol_exists("socket"          "${CURL_INCLUDES}" HAVE_SOCKET)  # winsock2.h sys/socket.h
+    check_symbol_exists("socketpair"      "${CURL_INCLUDES}" HAVE_SOCKETPAIR)  # sys/socket.h
+    check_symbol_exists("recv"            "${CURL_INCLUDES}" HAVE_RECV)  # proto/bsdsocket.h sys/types.h sys/socket.h
+    check_symbol_exists("send"            "${CURL_INCLUDES}" HAVE_SEND)  # proto/bsdsocket.h sys/types.h sys/socket.h
+    check_function_exists("sendmsg"       HAVE_SENDMSG)
+    check_function_exists("sendmmsg"      HAVE_SENDMMSG)
+    check_symbol_exists("select"          "${CURL_INCLUDES}" HAVE_SELECT)  # proto/bsdsocket.h sys/select.h sys/socket.h
+    check_symbol_exists("strdup"          "string.h" HAVE_STRDUP)
+    check_symbol_exists("memrchr"         "string.h" HAVE_MEMRCHR)
+    check_symbol_exists("alarm"           "unistd.h" HAVE_ALARM)
+    check_symbol_exists("fcntl"           "fcntl.h" HAVE_FCNTL)
+    check_function_exists("getppid"       HAVE_GETPPID)
+    check_function_exists("utimes"        HAVE_UTIMES)
 
-    check_symbol_exists(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR)
-    check_symbol_exists(gethostbyaddr_r "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR_R)
-    check_symbol_exists(gettimeofday  "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY)
-    check_symbol_exists(inet_addr     "${CURL_INCLUDES}" HAVE_INET_ADDR)
-    check_symbol_exists(inet_ntoa     "${CURL_INCLUDES}" HAVE_INET_NTOA)
-    check_symbol_exists(inet_ntoa_r   "${CURL_INCLUDES}" HAVE_INET_NTOA_R)
-    check_symbol_exists(tcsetattr     "${CURL_INCLUDES}" HAVE_TCSETATTR)
-    check_symbol_exists(tcgetattr     "${CURL_INCLUDES}" HAVE_TCGETATTR)
-    check_symbol_exists(perror        "${CURL_INCLUDES}" HAVE_PERROR)
-    check_symbol_exists(closesocket   "${CURL_INCLUDES}" HAVE_CLOSESOCKET)
-    check_symbol_exists(setvbuf       "${CURL_INCLUDES}" HAVE_SETVBUF)
-    check_symbol_exists(sigsetjmp     "${CURL_INCLUDES}" HAVE_SIGSETJMP)
-    check_symbol_exists(getpass_r     "${CURL_INCLUDES}" HAVE_GETPASS_R)
-    check_symbol_exists(strlcat       "${CURL_INCLUDES}" HAVE_STRLCAT)
-    check_symbol_exists(getpwuid      "${CURL_INCLUDES}" HAVE_GETPWUID)
-    check_symbol_exists(geteuid       "${CURL_INCLUDES}" HAVE_GETEUID)
-    check_symbol_exists(utime         "${CURL_INCLUDES}" HAVE_UTIME)
-    check_symbol_exists(gmtime_r      "${CURL_INCLUDES}" HAVE_GMTIME_R)
-    check_symbol_exists(localtime_r   "${CURL_INCLUDES}" HAVE_LOCALTIME_R)
+    check_function_exists("gettimeofday"  HAVE_GETTIMEOFDAY)  # sys/time.h
+    check_symbol_exists("closesocket"     "${CURL_INCLUDES}" HAVE_CLOSESOCKET)  # winsock2.h
+    check_symbol_exists("sigsetjmp"       "setjmp.h" HAVE_SIGSETJMP)
+    check_function_exists("getpass_r"     HAVE_GETPASS_R)
+    check_function_exists("getpwuid"      HAVE_GETPWUID)
+    check_function_exists("getpwuid_r"    HAVE_GETPWUID_R)
+    check_function_exists("geteuid"       HAVE_GETEUID)
+    check_function_exists("utime"         HAVE_UTIME)
+    check_symbol_exists("gmtime_r"        "stdlib.h;time.h" HAVE_GMTIME_R)
 
-    check_symbol_exists(gethostbyname   "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME)
-    check_symbol_exists(gethostbyname_r "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME_R)
+    check_symbol_exists("gethostbyname_r" "netdb.h" HAVE_GETHOSTBYNAME_R)
+    check_symbol_exists("gethostname"     "${CURL_INCLUDES}" HAVE_GETHOSTNAME)  # winsock2.h unistd.h proto/bsdsocket.h
 
-    check_symbol_exists(signal        "${CURL_INCLUDES}" HAVE_SIGNAL_FUNC)
-    check_symbol_exists(SIGALRM       "${CURL_INCLUDES}" HAVE_SIGNAL_MACRO)
-    if(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
-      set(HAVE_SIGNAL 1)
-    endif(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
-    check_symbol_exists(uname          "${CURL_INCLUDES}" HAVE_UNAME)
-    check_symbol_exists(strtoll        "${CURL_INCLUDES}" HAVE_STRTOLL)
-    check_symbol_exists(_strtoi64      "${CURL_INCLUDES}" HAVE__STRTOI64)
-    check_symbol_exists(strerror_r     "${CURL_INCLUDES}" HAVE_STRERROR_R)
-    check_symbol_exists(siginterrupt   "${CURL_INCLUDES}" HAVE_SIGINTERRUPT)
-    check_symbol_exists(perror         "${CURL_INCLUDES}" HAVE_PERROR)
-    check_symbol_exists(fork           "${CURL_INCLUDES}" HAVE_FORK)
-    check_symbol_exists(getaddrinfo    "${CURL_INCLUDES}" HAVE_GETADDRINFO)
-    check_symbol_exists(freeaddrinfo   "${CURL_INCLUDES}" HAVE_FREEADDRINFO)
-    check_symbol_exists(freeifaddrs    "${CURL_INCLUDES}" HAVE_FREEIFADDRS)
-    check_symbol_exists(pipe           "${CURL_INCLUDES}" HAVE_PIPE)
-    check_symbol_exists(ftruncate      "${CURL_INCLUDES}" HAVE_FTRUNCATE)
-    check_symbol_exists(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME)
-    check_symbol_exists(getrlimit      "${CURL_INCLUDES}" HAVE_GETRLIMIT)
-    check_symbol_exists(setlocale      "${CURL_INCLUDES}" HAVE_SETLOCALE)
-    check_symbol_exists(setmode        "${CURL_INCLUDES}" HAVE_SETMODE)
-    check_symbol_exists(setrlimit      "${CURL_INCLUDES}" HAVE_SETRLIMIT)
-    check_symbol_exists(fcntl          "${CURL_INCLUDES}" HAVE_FCNTL)
-    check_symbol_exists(ioctl          "${CURL_INCLUDES}" HAVE_IOCTL)
-    check_symbol_exists(setsockopt     "${CURL_INCLUDES}" HAVE_SETSOCKOPT)
+    check_symbol_exists("signal"          "signal.h" HAVE_SIGNAL)
+    check_symbol_exists("strerror_r"      "stdlib.h;string.h" HAVE_STRERROR_R)
+    check_symbol_exists("sigaction"       "signal.h" HAVE_SIGACTION)
+    check_symbol_exists("siginterrupt"    "signal.h" HAVE_SIGINTERRUPT)
+    check_symbol_exists("getaddrinfo"     "${CURL_INCLUDES};stdlib.h;string.h" HAVE_GETADDRINFO)  # ws2tcpip.h sys/socket.h netdb.h
+    check_symbol_exists("getifaddrs"      "${CURL_INCLUDES};stdlib.h" HAVE_GETIFADDRS)  # ifaddrs.h
+    check_symbol_exists("freeaddrinfo"    "${CURL_INCLUDES}" HAVE_FREEADDRINFO)  # ws2tcpip.h sys/socket.h netdb.h
+    check_function_exists("pipe"          HAVE_PIPE)
+    check_function_exists("pipe2"         HAVE_PIPE2)
+    check_function_exists("eventfd"       HAVE_EVENTFD)
+    check_symbol_exists("ftruncate"       "unistd.h" HAVE_FTRUNCATE)
+    check_symbol_exists("getpeername"     "${CURL_INCLUDES}" HAVE_GETPEERNAME)  # winsock2.h unistd.h proto/bsdsocket.h
+    check_symbol_exists("getsockname"     "${CURL_INCLUDES}" HAVE_GETSOCKNAME)  # winsock2.h unistd.h proto/bsdsocket.h
+    check_function_exists("getrlimit"       HAVE_GETRLIMIT)
+    check_function_exists("setlocale"       HAVE_SETLOCALE)
+    check_function_exists("setrlimit"       HAVE_SETRLIMIT)
 
-    if(HAVE_SIZEOF_LONG_LONG)
-      set(HAVE_LONGLONG 1)
-      set(HAVE_LL 1)
-    endif(HAVE_SIZEOF_LONG_LONG)
-
-    check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME)
-    check_function_exists(gethostname HAVE_GETHOSTNAME)
-
-    check_include_file_concat("pthread.h" HAVE_PTHREAD_H)
-    check_symbol_exists(recv "sys/socket.h" HAVE_RECV)
-    check_symbol_exists(send "sys/socket.h" HAVE_SEND)
-
+    if(WIN32)
+      # include wincrypt.h as a workaround for mingw-w64 __MINGW64_VERSION_MAJOR <= 5 header bug */
+      check_symbol_exists("if_nametoindex"  "winsock2.h;wincrypt.h;iphlpapi.h" HAVE_IF_NAMETOINDEX)  # Windows Vista+ non-UWP */
+    else()
+      check_function_exists("if_nametoindex"  HAVE_IF_NAMETOINDEX)  # net/if.h
+      check_function_exists("realpath"        HAVE_REALPATH)
+      check_function_exists("sched_yield"     HAVE_SCHED_YIELD)
+      check_symbol_exists("strcasecmp"      "string.h" HAVE_STRCASECMP)
+      check_symbol_exists("stricmp"         "string.h" HAVE_STRICMP)
+      check_symbol_exists("strcmpi"         "string.h" HAVE_STRCMPI)
+    endif()
     check_struct_has_member("struct sockaddr_un" sun_path "sys/un.h" USE_UNIX_SOCKETS)
 
     list(APPEND CMAKE_REQUIRED_INCLUDES "${CURL_SOURCES_DIR}/include")
     set(CMAKE_EXTRA_INCLUDE_FILES "curl/system.h")
     check_type_size("curl_off_t"  SIZEOF_CURL_OFF_T)
 
-    add_definitions(-DHAVE_GLIBC_STRERROR_R=1)
-
     include(${CURL_SOURCES_DIR}/CMake/OtherTests.cmake)
 
     foreach(CURL_TEST
@@ -304,30 +258,20 @@
         HAVE_IOCTL_FIONBIO
         HAVE_IOCTL_SIOCGIFADDR
         HAVE_SETSOCKOPT_SO_NONBLOCK
-        HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
-        TIME_WITH_SYS_TIME
-        HAVE_O_NONBLOCK
-        HAVE_GETHOSTBYADDR_R_5
-        HAVE_GETHOSTBYADDR_R_7
-        HAVE_GETHOSTBYADDR_R_8
-        HAVE_GETHOSTBYADDR_R_5_REENTRANT
-        HAVE_GETHOSTBYADDR_R_7_REENTRANT
-        HAVE_GETHOSTBYADDR_R_8_REENTRANT
         HAVE_GETHOSTBYNAME_R_3
         HAVE_GETHOSTBYNAME_R_5
         HAVE_GETHOSTBYNAME_R_6
+        HAVE_BOOL_T
+        STDC_HEADERS
+        HAVE_ATOMIC
+        HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
         HAVE_GETHOSTBYNAME_R_3_REENTRANT
         HAVE_GETHOSTBYNAME_R_5_REENTRANT
         HAVE_GETHOSTBYNAME_R_6_REENTRANT
-        HAVE_SOCKLEN_T
-        HAVE_IN_ADDR_T
-        HAVE_BOOL_T
-        STDC_HEADERS
-        RETSIGTYPE_TEST
-        HAVE_INET_NTOA_R_DECL
-        HAVE_INET_NTOA_R_DECL_REENTRANT
         HAVE_GETADDRINFO
         HAVE_FILE_OFFSET_BITS
+        HAVE_GLIBC_STRERROR_R
+        HAVE_POSIX_STRERROR_R
         )
       curl_internal_test(${CURL_TEST})
     endforeach(CURL_TEST)
--- a/OrthancFramework/Resources/CMake/LibPngConfiguration.cmake	Tue Nov 18 19:17:35 2025 +0100
+++ b/OrthancFramework/Resources/CMake/LibPngConfiguration.cmake	Wed Nov 19 13:11:41 2025 +0100
@@ -21,9 +21,9 @@
 
 
 if (STATIC_BUILD OR NOT USE_SYSTEM_LIBPNG)
-  SET(LIBPNG_SOURCES_DIR ${CMAKE_BINARY_DIR}/libpng-1.6.40)
-  SET(LIBPNG_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/libpng-1.6.40.tar.gz")
-  SET(LIBPNG_MD5 "ec4b597c3a9b1f8d2826575f530367b7")
+  SET(LIBPNG_SOURCES_DIR ${CMAKE_BINARY_DIR}/libpng-1.6.50)
+  SET(LIBPNG_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/libpng-1.6.50.tar.gz")
+  SET(LIBPNG_MD5 "eef2d3da281ae83ac8a8f5fd9fa9d325")
 
   DownloadPackage(${LIBPNG_MD5} ${LIBPNG_URL} "${LIBPNG_SOURCES_DIR}")
 
--- a/OrthancFramework/Resources/Patches/curl-8.12.1.patch	Tue Nov 18 19:17:35 2025 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-diff -urEb curl-8.12.1-orig/CMake/Macros.cmake curl-8.12.1/CMake/Macros.cmake
---- curl-8.12.1-orig/CMake/Macros.cmake 2025-02-13 08:15:00.000000000 +0100
-+++ curl-8.12.1/CMake/Macros.cmake      2025-03-27 10:25:42.119275658 +0100
-@@ -50,7 +50,7 @@
-     message(STATUS "Performing Test ${_curl_test}")
-     try_compile(${_curl_test}
-       ${PROJECT_BINARY_DIR}
--      "${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c"
-+      "${CURL_SOURCES_DIR}/CMake/CurlTests.c"
-       CMAKE_FLAGS
-         "-DCOMPILE_DEFINITIONS:STRING=-D${_curl_test} ${CURL_TEST_DEFINES} ${_cmake_required_definitions}"
-         "${_curl_test_add_libraries}"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancFramework/Resources/Patches/curl-8.17.0.patch	Wed Nov 19 13:11:41 2025 +0100
@@ -0,0 +1,12 @@
+diff -urEb curl-8.17.0-orig/CMake/Macros.cmake curl-8.17.0/CMake/Macros.cmake
+--- curl-8.17.0-orig/CMake/Macros.cmake	2025-11-19 10:41:00.404885652 +0100
++++ curl-8.17.0/CMake/Macros.cmake	2025-11-19 10:42:01.556360886 +0100
+@@ -50,7 +50,7 @@
+     message(STATUS "Performing Test ${_curl_test}")
+     try_compile(${_curl_test}
+       ${PROJECT_BINARY_DIR}
+-      "${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c"
++      "${CURL_SOURCES_DIR}/CMake/CurlTests.c"
+       CMAKE_FLAGS
+         "-DCOMPILE_DEFINITIONS:STRING=-D${_curl_test} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS} ${_cmake_required_definitions}"
+         "${_curl_test_add_libraries}"
--- a/OrthancServer/Resources/CodeModel/GenerateCodeModel.py	Tue Nov 18 19:17:35 2025 +0100
+++ b/OrthancServer/Resources/CodeModel/GenerateCodeModel.py	Wed Nov 19 13:11:41 2025 +0100
@@ -475,7 +475,7 @@
         # Check that the first argument is the Orthanc context
         if (len(args) == 0 or
             args[0].type.kind != clang.cindex.TypeKind.POINTER or
-            args[0].type.get_pointee().spelling != 'OrthancPluginContext'):
+            not args[0].type.get_pointee().spelling in [ 'OrthancPluginContext', 'const OrthancPluginContext' ]):
             print('[INFO] Not in the Orthanc SDK: %s()' % node.spelling)
             continue
 
--- a/OrthancServer/UnitTestsSources/VersionsTests.cpp	Tue Nov 18 19:17:35 2025 +0100
+++ b/OrthancServer/UnitTestsSources/VersionsTests.cpp	Wed Nov 19 13:11:41 2025 +0100
@@ -120,13 +120,13 @@
 TEST(Versions, CurlStatic)
 {
   curl_version_info_data* v = curl_version_info(CURLVERSION_NOW);
-  ASSERT_STREQ("8.9.0", v->version);
+  ASSERT_STREQ("8.17.0", v->version);
 }
 
 TEST(Versions, PngStatic)
 {
-  ASSERT_EQ(10640u, png_access_version_number());
-  ASSERT_STREQ("1.6.40", PNG_LIBPNG_VER_STRING);
+  ASSERT_EQ(10650u, png_access_version_number());
+  ASSERT_STREQ("1.6.50", PNG_LIBPNG_VER_STRING);
 }
 
 TEST(Versions, JpegStatic)