Skip to content

Commit

Permalink
Merge 12b3af4 into 11ed829
Browse files Browse the repository at this point in the history
  • Loading branch information
andre2007 committed Jun 26, 2017
2 parents 11ed829 + 12b3af4 commit 3c8d6f6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/dub/internal/vibecompat/inet/url.d
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ struct URL {
}
}

this.localURI = str;
this.localURI = (str == "") ? "/" : str;
}
/// ditto
static URL parse(string url_string)
Expand Down Expand Up @@ -277,4 +277,10 @@ unittest {
assert(url.path.toString() == "/sub2/index.html", url.path.toString());
assert(url.queryString == "query", url.queryString);
assert(url.anchor == "anchor", url.anchor);

url = URL("http://localhost")~Path("packages");
assert(url.toString() == "http://localhost/packages", url.toString());

url = URL("http://localhost/")~Path("packages");
assert(url.toString() == "http://localhost/packages", url.toString());
}

0 comments on commit 3c8d6f6

Please sign in to comment.