diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-07-27 13:20:15 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-07-27 13:20:15 +0200 |
commit | c03c8fe2d943347aeaea3b8c723c828b19f1ca4f (patch) | |
tree | c5781c14548bc22882ccd66c2231d83a4973bc84 /src | |
parent | 2eaa81fe039f69f31eae74309f229e11c2b006e9 (diff) | |
download | merchant-c03c8fe2d943347aeaea3b8c723c828b19f1ca4f.tar.gz merchant-c03c8fe2d943347aeaea3b8c723c828b19f1ca4f.tar.bz2 merchant-c03c8fe2d943347aeaea3b8c723c828b19f1ca4f.zip |
switch to new URI schema with taler+http:// instead of insecure
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/taler-merchant-httpd_get-orders-ID.c | 13 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c | 14 |
2 files changed, 11 insertions, 16 deletions
diff --git a/src/backend/taler-merchant-httpd_get-orders-ID.c b/src/backend/taler-merchant-httpd_get-orders-ID.c index d569970f..64c4f182 100644 --- a/src/backend/taler-merchant-httpd_get-orders-ID.c +++ b/src/backend/taler-merchant-httpd_get-orders-ID.c @@ -613,7 +613,6 @@ TMH_make_taler_pay_uri (struct MHD_Connection *con, const char *forwarded_host; const char *uri_path; const char *uri_instance_id; - const char *query; char *result; host = MHD_lookup_connection_value (con, @@ -642,20 +641,18 @@ TMH_make_taler_pay_uri (struct MHD_Connection *con, return NULL; } - if (GNUNET_YES == TALER_mhd_is_https (con)) - query = ""; - else - query = "?insecure=1"; GNUNET_assert (NULL != order_id); GNUNET_assert (0 < GNUNET_asprintf (&result, - "taler://pay/%s/%s/%s/%s%s%s%s", + "%s://pay/%s/%s/%s/%s%s%s", + (GNUNET_YES == TALER_mhd_is_https (con)) + ? "taler" + : "taler+http", host, uri_path, uri_instance_id, order_id, (NULL == session_id) ? "" : "/", - (NULL == session_id) ? "" : session_id, - query)); + (NULL == session_id) ? "" : session_id)); return result; } diff --git a/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c b/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c index 344e003e..0e592467 100644 --- a/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c +++ b/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c @@ -51,7 +51,6 @@ make_taler_refund_uri (struct MHD_Connection *connection, const char *forwarded_host; const char *uri_path; const char *uri_instance_id; - const char *query; char *result; GNUNET_assert (NULL != instance_id); @@ -80,17 +79,16 @@ make_taler_refund_uri (struct MHD_Connection *connection, uri_instance_id = "-"; else uri_instance_id = instance_id; - if (GNUNET_YES == TALER_mhd_is_https (connection)) - query = ""; - else - query = "?insecure=1"; GNUNET_assert (0 < GNUNET_asprintf (&result, - "taler://refund/%s/%s/%s/%s%s", + "%s://refund/%s/%s/%s/%s", + (GNUNET_YES == TALER_mhd_is_https ( + connection)) + ? "taler" + : "taler+http", host, uri_path, uri_instance_id, - order_id, - query)); + order_id)); return result; } |