aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Uri.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Uri.cpp b/src/Uri.cpp
index 309ce88..2d549c2 100644
--- a/src/Uri.cpp
+++ b/src/Uri.cpp
@@ -671,6 +671,15 @@ namespace Uri {
return false;
}
+ // Handle special case of absolute URI with empty
+ // path -- treat the same as "/" path.
+ if (
+ !impl_->scheme.empty()
+ && impl_->path.empty()
+ ) {
+ impl_->path.push_back("");
+ }
+
// Next, parse the fragment if there is one.
if (!impl_->ParseFragment(queryAndOrFragment, rest)) {
return false;