diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2018-07-03 00:22:30 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2018-07-03 00:25:23 -0700 |
commit | e1ba9b2e46f0d67b5b3483e28750e4a3c86d1c39 (patch) | |
tree | 988b787277ef3a9c296ae8bba4bef4db8c0dcd12 /src | |
parent | ea77de493c75fc5b7fad10ef79b645e98d3f94e8 (diff) |
Document parts of the path normalization process
Add comments that link parts of the code back
to lines of the pseudocode in the RFC,
to make the code easier to understand.
Diffstat (limited to 'src')
-rw-r--r-- | src/Uri.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Uri.cpp b/src/Uri.cpp index 721442e..30b58e5 100644 --- a/src/Uri.cpp +++ b/src/Uri.cpp @@ -810,6 +810,8 @@ namespace Uri { target.impl_->query = impl_->query; } } else { + // RFC describes this as: + // "if (R.path starts-with "/") then" if ( !relativeReference.impl_->path.empty() && (relativeReference.impl_->path[0] == "") @@ -817,6 +819,8 @@ namespace Uri { target.impl_->path = relativeReference.impl_->path; target.NormalizePath(); } else { + // RFC describes this as: + // "T.path = merge(Base.path, R.path);" target.impl_->path = impl_->path; if (target.impl_->path.size() > 1) { target.impl_->path.pop_back(); |