diff options
author | Omar Polo <op@omarpolo.com> | 2021-01-11 14:45:57 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-01-11 14:45:57 +0000 |
commit | 7b1d97903280066059ed4b00d4d407876957d071 (patch) | |
tree | 0f3ee57dfbb2e3d0942cae1ab020e00aa8d82993 /gmid.c | |
parent | 6a9ae707737d978bccbabdc36beae509151a7be2 (diff) |
reject non-gemini protocols with 531.4
Diffstat (limited to 'gmid.c')
-rw-r--r-- | gmid.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -600,6 +600,13 @@ handle(struct pollfd *fds, struct client *client) return; } + if (strcmp(iri.schema, "gemini")) { + if (!start_reply(fds, client, PROXY_REFUSED, "won't proxy request")) + return; + goodbye(fds, client); + return; + } + LOGI(client, "GET %s%s%s", *iri.path ? iri.path : "/", *iri.query ? "?" : "", |