summaryrefslogtreecommitdiff
path: root/src/gopher.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-01-02 14:18:52 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-01-02 14:18:52 +0200
commit46e17ce859a5507000629484227e3d8e68f6ad1d (patch)
tree04f7cb7ba462ab11acdf605bd6ff51441ac4cc4f /src/gopher.c
parentb24dde82d9ab52634f088be9546f24de5c5aa861 (diff)
parentfe4302d8cbd04d64cab96d7781285a9cf602d591 (diff)
Merge branch 'finger' into dev
Diffstat (limited to 'src/gopher.c')
-rw-r--r--src/gopher.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/gopher.c b/src/gopher.c
index dfdcf672..229ff9f4 100644
--- a/src/gopher.c
+++ b/src/gopher.c
@@ -149,16 +149,21 @@ void deinit_Gopher(iGopher *d) {
149void open_Gopher(iGopher *d, const iString *url) { 149void open_Gopher(iGopher *d, const iString *url) {
150 iUrl parts; 150 iUrl parts;
151 init_Url(&parts, url); 151 init_Url(&parts, url);
152 /* Determine Gopher item type. */
153 d->type = '1';
154 if (!isEmpty_Range(&parts.path)) { 152 if (!isEmpty_Range(&parts.path)) {
155 if (*parts.path.start == '/') { 153 if (*parts.path.start == '/') {
156 parts.path.start++; 154 parts.path.start++;
157 } 155 }
158 if (parts.path.start < parts.path.end) { 156 }
159 d->type = *parts.path.start; 157 /* Determine Gopher item type (finger is type 0). */
160 parts.path.start++; 158 if (equalCase_Rangecc(parts.scheme, "finger")) {
161 } 159 d->type = '0';
160 }
161 else if (parts.path.start < parts.path.end) {
162 d->type = *parts.path.start;
163 parts.path.start++;
164 }
165 else {
166 d->type = '1';
162 } 167 }
163 if (d->type == '7' && isEmpty_Range(&parts.query)) { 168 if (d->type == '7' && isEmpty_Range(&parts.query)) {
164 /* Ask for the query parameters first. */ 169 /* Ask for the query parameters first. */