Various fixes to PathBrowser etc to handle browsing HTTP subfolders

This commit is contained in:
Henrik Rydgård committed 2023-12-29 21:34:24 +01:00
1 parent 80bd328a9d
commit 9c1fd06c2f
4 files changed
+28 -13

No files matched your search

+4 -2
View File
@@ -42,12 +42,14 @@ void Url::Split() {
size_t sep = url_.find('/', colonSlashSlash + 3);
if (sep == std::string::npos) {
valid_ = false;
return;
sep = url_.size();
}
host_ = url_.substr(colonSlashSlash + 3, sep - colonSlashSlash - 3);
resource_ = url_.substr(sep); // include the slash!
if (resource_.empty()) {
resource_ = "/"; // Assume what was meant was the root.
}
size_t portsep = host_.rfind(':');
if (portsep != host_.npos) {