summaryrefslogtreecommitdiffabout
path: root/libmailutils/url/create.c
Side-by-side diff
Diffstat (limited to 'libmailutils/url/create.c') (more/less context) (ignore whitespace changes)
-rw-r--r--libmailutils/url/create.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libmailutils/url/create.c b/libmailutils/url/create.c
index 124be32..3b19a4f 100644
--- a/libmailutils/url/create.c
+++ b/libmailutils/url/create.c
@@ -269,7 +269,16 @@ _mu_url_ctx_parse_host (struct mu_url_ctx *ctx, int has_host)
if (*ctx->cur == '/')
{
if (has_host)
- ctx->cur++;
+ {
+ ctx->cur++;
+ if (*ctx->cur == 0)
+ {
+ rc = str_assign (&url->path, "");
+ if (rc == 0)
+ url->flags |= MU_URL_PATH;
+ return rc;
+ }
+ }
return _mu_url_ctx_parse_path (ctx);
}

Return to:

Send suggestions and report system problems to the System administrator.