diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-18 15:02:43 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-18 15:02:43 +0200 |
commit | 034b32f9f394777d22009c23370ff441fdea2050 (patch) | |
tree | 72147cde92a0b2f21148a394181a000c7230df72 /src/gmutil.c | |
parent | b55b694fdc5c079de527282ce96a27d71291653b (diff) |
Handling an URL that begins with a tilde
IssueID #40
Diffstat (limited to 'src/gmutil.c')
-rw-r--r-- | src/gmutil.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gmutil.c b/src/gmutil.c index 39a1aef3..04621e54 100644 --- a/src/gmutil.c +++ b/src/gmutil.c | |||
@@ -159,7 +159,10 @@ const iString *absoluteUrl_String(const iString *d, const iString *urlMaybeRelat | |||
159 | } | 159 | } |
160 | } | 160 | } |
161 | if (isDef_(rel.scheme) || isDef_(rel.host) || isAbsolutePath_(rel.path)) { | 161 | if (isDef_(rel.scheme) || isDef_(rel.host) || isAbsolutePath_(rel.path)) { |
162 | appendRange_String(absolute, isDef_(rel.path) ? rel.path : range_CStr("/")); /* absolute path */ | 162 | if (!startsWith_Rangecc(rel.path, "/")) { |
163 | appendCStr_String(absolute, "/"); | ||
164 | } | ||
165 | appendRange_String(absolute, rel.path); | ||
163 | } | 166 | } |
164 | else if (isDef_(rel.path)) { | 167 | else if (isDef_(rel.path)) { |
165 | if (!endsWith_Rangecc(orig.path, "/")) { | 168 | if (!endsWith_Rangecc(orig.path, "/")) { |