diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-01-18 23:28:50 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-01-18 23:32:35 +0100 |
commit | 800b74d552738618557da083e07e37bea439e39e (patch) | |
tree | 0078ea0f18348731e7676267535b41a34f29a01f | |
parent | 6ffd82f7594805dce02b3f999e91d9073c01e6ae (diff) | |
download | merchant-800b74d552738618557da083e07e37bea439e39e.tar.gz merchant-800b74d552738618557da083e07e37bea439e39e.tar.bz2 merchant-800b74d552738618557da083e07e37bea439e39e.zip |
generate taler://refund URIs correctly
-rw-r--r-- | src/backend/taler-merchant-httpd_refund.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/taler-merchant-httpd_refund.c b/src/backend/taler-merchant-httpd_refund.c index 6051f2bf..609450b3 100644 --- a/src/backend/taler-merchant-httpd_refund.c +++ b/src/backend/taler-merchant-httpd_refund.c @@ -92,6 +92,7 @@ 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; host = MHD_lookup_connection_value (connection, MHD_HEADER_KIND, "Host"); @@ -118,14 +119,20 @@ make_taler_refund_uri (struct MHD_Connection *connection, return NULL; } + if (GNUNET_YES == TALER_mhd_is_https (connection)) + query = ""; + else + query = "?insecure=1"; + GNUNET_assert (NULL != order_id); GNUNET_assert (0 < GNUNET_asprintf (&result, - "taler://refund/%s/%s/%s/%s", + "taler://refund/%s/%s/%s/%s%s", host, uri_path, uri_instance_id, - order_id)); + order_id, + query)); return result; } |