diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2018-07-02 21:44:18 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2018-07-02 21:44:18 -0700 |
commit | 212980eeb06bb44ff6b9da6fc3f324bdaeaf4929 (patch) | |
tree | 2f521122acaba0292aa5e411bd8039e3b23899cd /src/Uri.cpp | |
parent | 1af6861f8db57b54ba19b80964eb00c5f7340bfb (diff) |
Add more path normalization tests and fix a bug in it
For normalization "step 2C", if the output path was
empty, we don't want to pop the end of it off.
Diffstat (limited to 'src/Uri.cpp')
-rw-r--r-- | src/Uri.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Uri.cpp b/src/Uri.cpp index 35631cf..309ce88 100644 --- a/src/Uri.cpp +++ b/src/Uri.cpp @@ -759,7 +759,9 @@ namespace Uri { && (oldPath[1] == "..") ) { oldPath.erase(oldPath.begin() + 1); - impl_->path.pop_back(); + if (!impl_->path.empty()) { + impl_->path.pop_back(); + } } else // Step 2D |