diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-12-19 20:43:41 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-12-19 20:43:41 +0100 |
commit | 2d6303c698a277c831938c31a029661758ac397c (patch) | |
tree | 5e4f85400259921559cbce086ea5d6ddfa01544d /src/mint-lib | |
parent | bd44a3ee4cdf05ead052318e95a3146c1b541fbc (diff) | |
download | exchange-2d6303c698a277c831938c31a029661758ac397c.tar.xz |
avoid generating URLs with // in them
Diffstat (limited to 'src/mint-lib')
-rw-r--r-- | src/mint-lib/mint_api_handle.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mint-lib/mint_api_handle.c b/src/mint-lib/mint_api_handle.c index ef3da60ec..0ee24123f 100644 --- a/src/mint-lib/mint_api_handle.c +++ b/src/mint-lib/mint_api_handle.c @@ -695,6 +695,10 @@ MAH_path_to_url (struct TALER_MINT_Handle *h, { char *url; + if ( ('/' == path[0]) && + (0 < strlen (h->url)) && + ('/' == h->url[strlen (h->url) - 1]) ) + path++; /* avoid generating URL with "//" from concat */ GNUNET_asprintf (&url, "%s%s", h->url, |