diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2011-07-27 14:10:05 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2011-07-27 14:10:05 -0400 |
commit | 9f25904020b2e24dc0cf41a62440864f7f9a03a6 (patch) | |
tree | 088daaceaffe60ab03a82fc71e2e8d3851d3f36f /src | |
parent | 6f2e86c52fbf90d5efaef55fc9757b23bb27a80f (diff) |
Fixed a border case in URL resolver (empty path + {query|fragment})
BUG#948 Example: hg.dillo.org ("Contact" link).
Diffstat (limited to 'src')
-rw-r--r-- | src/url.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) |