summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd.c')
-rw-r--r--src/backend/taler-merchant-httpd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c
index 9137c39b..64fa7005 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -602,6 +602,7 @@ spa_redirect (const struct TMH_RequestHandler *rh,
{
const char *text = "Redirecting to /webui/";
struct MHD_Response *response;
+ char *dst;
response = MHD_create_response_from_buffer (strlen (text),
(void *) text,
@@ -616,6 +617,12 @@ spa_redirect (const struct TMH_RequestHandler *rh,
MHD_add_response_header (response,
MHD_HTTP_HEADER_CONTENT_TYPE,
"text/plain"));
+ if (NULL == hc->instance)
+ dst = GNUNET_strdup ("/webui/");
+ else
+ GNUNET_asprintf (&dst,
+ "/instances/%s/webui/",
+ hc->instance->settings.id);
if (MHD_NO ==
MHD_add_response_header (response,
MHD_HTTP_HEADER_LOCATION,
@@ -623,8 +630,10 @@ spa_redirect (const struct TMH_RequestHandler *rh,
{
GNUNET_break (0);
MHD_destroy_response (response);
+ GNUNET_free (dst);
return MHD_NO;
}
+ GNUNET_free (dst);
{
MHD_RESULT ret;