Support : Fixes for Relative URL Handling

When URLs combine a base URL with a relative part, the relative part's
path component was being pre-processed.  This removed any ".." from the
path and in some cases in the unit test cases, the ".." should have been
retained and then only later applied to the base URL.  This changes
fixes this so that the relative part is not pre-processed and is applied
with it's path in a raw state.

Completes Fixes for #14377
Change-Id: I9cebb8599889494e11f40a3b54c87ebca3ed1a21
Reviewed-on: https://review.haiku-os.org/529
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Andrew Lindesay
2018-09-11 18:39:53 +00:00
committed by waddlesplash
parent 66f19f7201
commit a609673ce8
2 changed files with 44 additions and 9 deletions
+4 -1
View File
@@ -100,7 +100,8 @@ public:
private:
void _ResetFields();
bool _ContainsDelimiter(const BString& url);
status_t _ExplodeUrlString(const BString& urlString);
status_t _ExplodeUrlString(const BString& urlString,
uint32 flags);
BString _MergePath(const BString& relative) const;
void _SetPathUnsafe(const BString& path);
@@ -122,6 +123,8 @@ private:
static bool _IsHostChar(char c);
static bool _IsPortChar(char c);
static void _RemoveLastPathComponent(BString& path);
BString _UrlMimeType() const;
private: