aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-08-24 09:48:11 +0000
committerOmar Polo <op@omarpolo.com>2024-08-24 09:48:11 +0000
commit3ec1d34a16a6c778a9e4c89879db4ffd2d9c17f6 (patch)
treef85eaae6232e4ff31f8b4a96da0f4615a3f50cd0 /server.c
parent07893552478cb648ca4ebac64885a27719c437b3 (diff)
fix previous; no need to match_host for the alias
The issue with the test was due to differences in upper/lower cased letters in the domain names. Normally these don't matter, and when decoding the IRI we lowercase, BUT the SNI can have upper-case letters and we preserve them as-is in `c->domain'.
Diffstat (limited to 'server.c')
-rw-r--r--server.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/server.c b/server.c
index 99467c0..01d9f7f 100644
--- a/server.c
+++ b/server.c
@@ -1020,8 +1020,7 @@ client_read(struct bufferevent *bev, void *d)
/* ignore the port number */
if (strcmp(c->iri.schema, "gemini") ||
- c->host == NULL ||
- !match_host(c->host, c)) {
+ strcasecmp(c->domain, decoded)) {
start_reply(c, PROXY_REFUSED, "won't proxy request");
return;
}