diff options
Diffstat (limited to 'src/gmutil.c')
-rw-r--r-- | src/gmutil.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gmutil.c b/src/gmutil.c index a299347f..ab9a8eea 100644 --- a/src/gmutil.c +++ b/src/gmutil.c | |||
@@ -81,6 +81,16 @@ static iRangecc prevPathSeg_(const char *end, const char *start) { | |||
81 | return seg; | 81 | return seg; |
82 | } | 82 | } |
83 | 83 | ||
84 | void stripDefaultUrlPort_String(iString *d) { | ||
85 | iUrl parts; | ||
86 | init_Url(&parts, d); | ||
87 | if (equalCase_Rangecc(parts.scheme, "gemini") && equal_Rangecc(parts.port, "1965")) { | ||
88 | /* Always preceded by a colon. */ | ||
89 | remove_Block(&d->chars, parts.port.start - 1 - constBegin_String(d), | ||
90 | size_Range(&parts.port) + 1); | ||
91 | } | ||
92 | } | ||
93 | |||
84 | void cleanUrlPath_String(iString *d) { | 94 | void cleanUrlPath_String(iString *d) { |
85 | iString clean; | 95 | iString clean; |
86 | init_String(&clean); | 96 | init_String(&clean); |