diff options
Diffstat (limited to 'src/gmutil.c')
-rw-r--r-- | src/gmutil.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gmutil.c b/src/gmutil.c index 34132015..c0eda099 100644 --- a/src/gmutil.c +++ b/src/gmutil.c | |||
@@ -290,8 +290,15 @@ const iString *absoluteUrl_String(const iString *d, const iString *urlMaybeRelat | |||
290 | appendCStr_String(absolute, "://"); | 290 | appendCStr_String(absolute, "://"); |
291 | /* Authority. */ { | 291 | /* Authority. */ { |
292 | const iUrl *selHost = isDef_(rel.host) ? &rel : &orig; | 292 | const iUrl *selHost = isDef_(rel.host) ? &rel : &orig; |
293 | const iBool isIPv6 = iStrStrN(selHost->host.start, ":", size_Range(&selHost->host)) != NULL; | ||
293 | iString *decHost = punyDecodeHost_(selHost->host); | 294 | iString *decHost = punyDecodeHost_(selHost->host); |
295 | if (isIPv6) { | ||
296 | appendCStr_String(absolute, "["); | ||
297 | } | ||
294 | append_String(absolute, decHost); | 298 | append_String(absolute, decHost); |
299 | if (isIPv6) { | ||
300 | appendCStr_String(absolute, "]"); | ||
301 | } | ||
295 | delete_String(decHost); | 302 | delete_String(decHost); |
296 | /* Default Gemini port is removed as redundant; normalization. */ | 303 | /* Default Gemini port is removed as redundant; normalization. */ |
297 | if (!isEmpty_Range(&selHost->port) && (!equalCase_Rangecc(scheme, "gemini") | 304 | if (!isEmpty_Range(&selHost->port) && (!equalCase_Rangecc(scheme, "gemini") |