diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-06-25 12:35:57 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-06-25 12:35:57 +0200 |
commit | 2563686e6645024af62706014be11879d4122599 (patch) | |
tree | a6fd250b9d42c294580c3b93074d221da82c7475 /src/lib/merchant_api_track_transaction.c | |
parent | 633a9b641ec7bbd4a60bb97a335808d212a7ceb9 (diff) |
handle '/' at end of URLs when composing http requests in libtalermerchant
Diffstat (limited to 'src/lib/merchant_api_track_transaction.c')
-rw-r--r-- | src/lib/merchant_api_track_transaction.c | 9 |
1 files changed, 7 insertions, 2 deletions
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 <taler/taler_json_lib.h> #include <taler/taler_signatures.h> +#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); |