summaryrefslogtreecommitdiff
path: root/src/gmrequest.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-11-07 12:41:01 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-11-07 12:41:01 +0200
commit64b9848f878ccd75aae75bf4d8d3f8a364f28ddc (patch)
treebc56660823e5dd2658fe4ef7535086011dd717c4 /src/gmrequest.c
parentf309d604a720a9442c2249d3a738f746d1503b47 (diff)
Treat Gopher as an unsupported protocol
Diffstat (limited to 'src/gmrequest.c')
-rw-r--r--src/gmrequest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c
index f15d80f1..a83a7666 100644
--- a/src/gmrequest.c
+++ b/src/gmrequest.c
@@ -534,6 +534,12 @@ void submit_GmRequest(iGmRequest *d) {
534 port = 0; 534 port = 0;
535 } 535 }
536 } 536 }
537 else if (!equalCase_Rangecc(url.scheme, "gemini")) {
538 d->resp.statusCode = unsupportedProtocol_GmStatusCode;
539 d->state = finished_GmRequestState;
540 iNotifyAudience(d, finished, GmRequestFinished);
541 return;
542 }
537 d->state = receivingHeader_GmRequestState; 543 d->state = receivingHeader_GmRequestState;
538 d->req = new_TlsRequest(); 544 d->req = new_TlsRequest();
539 const iGmIdentity *identity = identityForUrl_GmCerts(d->certs, &d->url); 545 const iGmIdentity *identity = identityForUrl_GmCerts(d->certs, &d->url);