aboutsummaryrefslogtreecommitdiff
path: root/src/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/url.c')
-rw-r--r--src/url.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/url.c b/src/url.c
index ae1f131b..faee044a 100644
--- a/src/url.c
+++ b/src/url.c
@@ -233,6 +233,8 @@ static Dstr *Url_resolve_relative(const char *RelStr,
dStr_append(SolvedUrl, BaseStr);
if ((p = strchr(SolvedUrl->str, '#')))
dStr_truncate(SolvedUrl, p - SolvedUrl->str);
+ if (!BaseUrl->path)
+ dStr_append_c(SolvedUrl, '/');
if (RelUrl->query) { /* query */
if (BaseUrl->query)