merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit d0e0fcaca528979231e254976a88bbc86f45cf3a
parent 1f46cbe802fb70645994790caa3800c55e0f48e1
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 11 Aug 2026 23:56:44 +0200

complete HTTP1/3 selection logic

Diffstat:
Msrc/backend/taler-merchant-depositcheck.c | 16++++++++++++++++
Msrc/backend/taler-merchant-donaukeyupdate.c | 16++++++++++++++++
Msrc/backend/taler-merchant-exchangekeyupdate.c | 16++++++++++++++++
Msrc/backend/taler-merchant-httpd.c | 24+++++++++++++-----------
Msrc/backend/taler-merchant-kyccheck.c | 16++++++++++++++++
Msrc/backend/taler-merchant-reconciliation.c | 16++++++++++++++++
6 files changed, 93 insertions(+), 11 deletions(-)

diff --git a/src/backend/taler-merchant-depositcheck.c b/src/backend/taler-merchant-depositcheck.c @@ -261,6 +261,15 @@ static char *exchange_url; static int global_ret; /** + * Should we enable HTTP/2 and HTTP/3 when talking to the exchange? + * Those are not expected to be terribly beneficial for a client with + * stable connections to a few servers, but they could cause stability + * issues with libcurl. Hence we *default* to HTTP/1.1-only, as that + * is the conservative and most tested code path. + */ +static int enable_h3; + +/** * #GNUNET_YES if we are in test mode and should exit when idle. */ static int test_mode; @@ -1102,6 +1111,9 @@ run (void *cls, (void) args; cfg = c; + TALER_EXCHANGE_setup (enable_h3 + ? TALER_EXCHANGE_GO_ENABLE_HTTP3 + : TALER_EXCHANGE_GO_FORCE_HTTP1_1); if (NULL != cfgfile) cfg_filename = GNUNET_strdup (cfgfile); GNUNET_log (GNUNET_ERROR_TYPE_INFO, @@ -1192,6 +1204,10 @@ main (int argc, "BASE_URL", "limit us to checking deposits of this exchange", &exchange_url), + GNUNET_GETOPT_option_flag ('3', + "http3", + "enable support for HTTP/2 and HTTP/3", + &enable_h3), GNUNET_GETOPT_option_timetravel ('T', "timetravel"), GNUNET_GETOPT_option_flag ('t', diff --git a/src/backend/taler-merchant-donaukeyupdate.c b/src/backend/taler-merchant-donaukeyupdate.c @@ -243,6 +243,15 @@ static unsigned int active_inquiries; static int global_ret; /** + * Should we enable HTTP/2 and HTTP/3 when talking to the Donau? + * Those are not expected to be terribly beneficial for a client with + * stable connections to a few servers, but they could cause stability + * issues with libcurl. Hence we *default* to HTTP/1.1-only, as that + * is the conservative and most tested code path. + */ +static int enable_h3; + +/** * #GNUNET_YES if we are in test mode and should exit when idle. */ static int test_mode; @@ -1100,6 +1109,9 @@ run (void *cls, (void) cfgfile; cfg = c; + DONAU_setup (enable_h3 + ? DONAU_GO_ENABLE_HTTP3 + : DONAU_GO_FORCE_HTTP1_1); GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL); ctx = GNUNET_CURL_init (&GNUNET_CURL_gnunet_scheduler_reschedule, @@ -1183,6 +1195,10 @@ main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_option_flag ('3', + "http3", + "enable support for HTTP/2 and HTTP/3", + &enable_h3), GNUNET_GETOPT_option_timetravel ('T', "timetravel"), GNUNET_GETOPT_option_flag ('t', diff --git a/src/backend/taler-merchant-exchangekeyupdate.c b/src/backend/taler-merchant-exchangekeyupdate.c @@ -178,6 +178,15 @@ static unsigned int active_inquiries; static int global_ret; /** + * Should we enable HTTP/2 and HTTP/3 when talking to the exchange? + * Those are not expected to be terribly beneficial for a client with + * stable connections to a few servers, but they could cause stability + * issues with libcurl. Hence we *default* to HTTP/1.1-only, as that + * is the conservative and most tested code path. + */ +static int enable_h3; + +/** * #GNUNET_YES if we are in test mode and should exit when idle. */ static int test_mode; @@ -1041,6 +1050,9 @@ run (void *cls, (void) cfgfile; cfg = c; + TALER_EXCHANGE_setup (enable_h3 + ? TALER_EXCHANGE_GO_ENABLE_HTTP3 + : TALER_EXCHANGE_GO_FORCE_HTTP1_1); GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL); ctx = GNUNET_CURL_init (&GNUNET_CURL_gnunet_scheduler_reschedule, @@ -1100,6 +1112,10 @@ main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_option_flag ('3', + "http3", + "enable support for HTTP/2 and HTTP/3", + &enable_h3), GNUNET_GETOPT_option_timetravel ('T', "timetravel"), GNUNET_GETOPT_option_flag ('t', diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c @@ -28,6 +28,7 @@ #include <taler/taler_mhd_lib.h> #include <taler/taler_templating_lib.h> #include <taler/taler_exchange_service.h> +#include <donau/donau_service.h> #include "taler/taler_merchant_util.h" #include "taler-merchant-httpd_auth.h" #include "taler-merchant-httpd_dispatcher.h" @@ -139,11 +140,12 @@ static bool have_daemons; static int merchant_connection_close; /** - * Should we enable HTTP/2 and HTTP/3 (which are not expected to be - * terribly beneficial for a server with stable connections to an - * exchange, but which could cause stability issues with libcurl). - * Per default, we *enforce* HTTP/1.x-only, as that is the conservative - * and most tested code path. + * Should we enable HTTP/2 and HTTP/3 when talking to the exchange + * (and donau)? Those are not expected to be terribly beneficial for + * a server with stable connections to an exchange, but they could + * cause stability issues with libcurl. Per default, we *enforce* + * HTTP/1.x-only, as that is the conservative and most tested code + * path. */ static int enable_h3; @@ -1139,12 +1141,12 @@ run (void *cls, if (merchant_connection_close) go |= TALER_MHD_GO_FORCE_CONNECTION_CLOSE; TALER_MHD_setup (go); - if (! enable_h3) - { - TALER_EXCHANGE_setup (TALER_EXCHANGE_GO_FORCE_HTTP1_1); - /* NOTE: We probably should do something similar for - libdonau in the future as well! */ - } + TALER_EXCHANGE_setup (enable_h3 + ? TALER_EXCHANGE_GO_ENABLE_HTTP3 + : TALER_EXCHANGE_GO_FORCE_HTTP1_1); + DONAU_setup (enable_h3 + ? DONAU_GO_ENABLE_HTTP3 + : DONAU_GO_FORCE_HTTP1_1); global_ret = EXIT_SUCCESS; GNUNET_SCHEDULER_add_shutdown (&do_shutdown, diff --git a/src/backend/taler-merchant-kyccheck.c b/src/backend/taler-merchant-kyccheck.c @@ -427,6 +427,15 @@ static unsigned int active_inquiries; static int global_ret; /** + * Should we enable HTTP/2 and HTTP/3 when talking to the exchange? + * Those are not expected to be terribly beneficial for a client with + * stable connections to a few servers, but they could cause stability + * issues with libcurl. Hence we *default* to HTTP/1.1-only, as that + * is the conservative and most tested code path. + */ +static int enable_h3; + +/** * #GNUNET_YES if we are in test mode and should exit when idle. */ static int test_mode; @@ -2082,6 +2091,9 @@ run (void *cls, (void) cfgfile; cfg = c; + TALER_EXCHANGE_setup (enable_h3 + ? TALER_EXCHANGE_GO_ENABLE_HTTP3 + : TALER_EXCHANGE_GO_FORCE_HTTP1_1); if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time (cfg, "merchant-kyccheck", @@ -2212,6 +2224,10 @@ main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_option_flag ('3', + "http3", + "enable support for HTTP/2 and HTTP/3", + &enable_h3), GNUNET_GETOPT_option_timetravel ('T', "timetravel"), GNUNET_GETOPT_option_flag ('t', diff --git a/src/backend/taler-merchant-reconciliation.c b/src/backend/taler-merchant-reconciliation.c @@ -236,6 +236,15 @@ static bool found_problem; static int global_ret; /** + * Should we enable HTTP/2 and HTTP/3 when talking to the exchange? + * Those are not expected to be terribly beneficial for a client with + * stable connections to a few servers, but they could cause stability + * issues with libcurl. Hence we *default* to HTTP/1.1-only, as that + * is the conservative and most tested code path. + */ +static int enable_h3; + +/** * #GNUNET_YES if we are in test mode and should exit when idle. */ static int test_mode; @@ -1250,6 +1259,9 @@ run (void *cls, (void) cfgfile; cfg = c; + TALER_EXCHANGE_setup (enable_h3 + ? TALER_EXCHANGE_GO_ENABLE_HTTP3 + : TALER_EXCHANGE_GO_FORCE_HTTP1_1); GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL); ctx = GNUNET_CURL_init (&GNUNET_CURL_gnunet_scheduler_reschedule, @@ -1315,6 +1327,10 @@ main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_option_flag ('3', + "http3", + "enable support for HTTP/2 and HTTP/3", + &enable_h3), GNUNET_GETOPT_option_timetravel ('T', "timetravel"), GNUNET_GETOPT_option_flag ('t',