diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-01-02 11:35:53 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-01-02 11:36:53 +0200 |
commit | 51d823832538d495f382299ec668e7afa1cc12f8 (patch) | |
tree | 48884754c0d2d5f37f41425726d28ffa1101733e /src/gmrequest.c | |
parent | 2254b31a65c784888215169efc9a067f7dd3a430 (diff) |
Add support for Finger protocol
A patch courtesy of John Cowan.
IssueID #106
Diffstat (limited to 'src/gmrequest.c')
-rw-r--r-- | src/gmrequest.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c index 5b005fbb..a1cf1a8e 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c | |||
@@ -434,9 +434,6 @@ static void gopherError_GmRequest_(iGmRequest *d, iSocket *socket, int error, co | |||
434 | } | 434 | } |
435 | 435 | ||
436 | static void beginGopherConnection_GmRequest_(iGmRequest *d, const iString *host, uint16_t port) { | 436 | static void beginGopherConnection_GmRequest_(iGmRequest *d, const iString *host, uint16_t port) { |
437 | if (port == 0) { | ||
438 | port = 70; /* default port */ | ||
439 | } | ||
440 | clear_Block(&d->gopher.source); | 437 | clear_Block(&d->gopher.source); |
441 | iGmResponse *resp = d->resp; | 438 | iGmResponse *resp = d->resp; |
442 | d->gopher.meta = &resp->meta; | 439 | d->gopher.meta = &resp->meta; |
@@ -642,7 +639,11 @@ void submit_GmRequest(iGmRequest *d) { | |||
642 | } | 639 | } |
643 | } | 640 | } |
644 | else if (equalCase_Rangecc(url.scheme, "gopher")) { | 641 | else if (equalCase_Rangecc(url.scheme, "gopher")) { |
645 | beginGopherConnection_GmRequest_(d, host, port); | 642 | beginGopherConnection_GmRequest_(d, host, port ? port : 70); |
643 | return; | ||
644 | } | ||
645 | else if (equalCase_Rangecc(url.scheme, "finger")) { | ||
646 | beginGopherConnection_GmRequest_(d, host, port ? port : 79); | ||
646 | return; | 647 | return; |
647 | } | 648 | } |
648 | else if (!equalCase_Rangecc(url.scheme, "gemini")) { | 649 | else if (!equalCase_Rangecc(url.scheme, "gemini")) { |