diff options
Diffstat (limited to 'ui/common')
-rw-r--r-- | ui/common/url.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/common/url.c b/ui/common/url.c index 3e6c8da..4e4b961 100644 --- a/ui/common/url.c +++ b/ui/common/url.c @@ -170,6 +170,11 @@ struct pb_url *pb_url_parse(void *ctx, const char *url_str) url->port = NULL; url->host = talloc_strndup(url, p, path - p); } + + /* remove multiple leading slashes */ + for (; *path && *(path+1) == '/'; path++) + ; + url->path = talloc_strdup(url, path); } |