From 2563686e6645024af62706014be11879d4122599 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 25 Jun 2017 12:35:57 +0200 Subject: handle '/' at end of URLs when composing http requests in libtalermerchant --- src/lib/merchant_api_track_transaction.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/lib/merchant_api_track_transaction.c') diff --git a/src/lib/merchant_api_track_transaction.c b/src/lib/merchant_api_track_transaction.c index 560408f2..25a88b77 100644 --- a/src/lib/merchant_api_track_transaction.c +++ b/src/lib/merchant_api_track_transaction.c @@ -30,6 +30,7 @@ #include "taler_merchant_service.h" #include #include +#include "merchant_api_common.h" /** @@ -168,16 +169,20 @@ TALER_MERCHANT_track_transaction (struct GNUNET_CURL_Context *ctx, { struct TALER_MERCHANT_TrackTransactionHandle *tdo; CURL *eh; + char *base; tdo = GNUNET_new (struct TALER_MERCHANT_TrackTransactionHandle); tdo->ctx = ctx; tdo->cb = track_transaction_cb; tdo->cb_cls = track_transaction_cb_cls; + base = MAH_path_to_url_ (backend_uri, + "/track/transaction"); GNUNET_asprintf (&tdo->url, - "%s/track/transaction?order_id=%s&instance=%s", - backend_uri, + "%s?order_id=%s&instance=%s", + base, order_id, instance); + GNUNET_free (base); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Requesting URI '%s'\n", tdo->url); -- cgit v1.2.3