diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2024-02-10 13:41:39 +0100 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2024-02-10 13:41:39 +0100 |
commit | 66bce148dbc4cdc098b710c10e974d066158f08a (patch) | |
tree | add057afba7381c901da980251dd17503284e09b | |
parent | a63ae8bba773b5e2371ee82c23ba1172d9465bfe (diff) |
fix regression
m--------- | contrib/wallet-core | 0 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd.c | 18 |
2 files changed, 12 insertions, 6 deletions
diff --git a/contrib/wallet-core b/contrib/wallet-core -Subproject ae088de54c086613a52cd6dd8d88f6535634c42 +Subproject d6ea0db963a73fa67eac98122ba2600ec7314fb diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c index 829daf55..8220f84d 100644 --- a/src/backend/taler-merchant-httpd.c +++ b/src/backend/taler-merchant-httpd.c @@ -1530,7 +1530,7 @@ url_handler (void *cls, strlen (instance_prefix))) { /* url starts with "/instances/" */ - const char *istart = hc->full_url + strlen (instance_prefix); + const char *istart = url + strlen (instance_prefix); const char *slash = strchr (istart, '/'); char *instance_id; @@ -1544,6 +1544,8 @@ url_handler (void *cls, { MHD_RESULT ret; struct MHD_Response *response; + const char *rstart = hc->full_url + strlen (instance_prefix); + const char *rslash = strchr (rstart, '/'); GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Client used deprecated '/instances/default/' path. Redirecting to modern path\n"); @@ -1556,7 +1558,7 @@ url_handler (void *cls, if (MHD_NO == MHD_add_response_header (response, MHD_HTTP_HEADER_LOCATION, - slash)) + rslash)) { GNUNET_break (0); MHD_destroy_response (response); @@ -1636,7 +1638,11 @@ url_handler (void *cls, "/private")) ) { handlers = private_handlers; - url += strlen (private_prefix) - 1; + if (0 == strcmp (url, + "/private")) + url = "/"; + else + url += strlen (private_prefix) - 1; } else { @@ -2156,9 +2162,9 @@ run (void *cls, RFC_8959_PREFIX, strlen (RFC_8959_PREFIX))) ) { - fprintf (stderr, - "Authentication token does not start with `%s' prefix\n", - RFC_8959_PREFIX); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Authentication token does not start with `%s' prefix\n", + RFC_8959_PREFIX); global_ret = EXIT_NOTCONFIGURED; GNUNET_SCHEDULER_shutdown (); return; |