aboutsummaryrefslogtreecommitdiff
path: root/gmid.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-01-11 13:08:00 +0000
committerOmar Polo <op@omarpolo.com>2021-01-11 13:08:00 +0000
commit3c1cf9d07cb679ba444566159538b510902f2de9 (patch)
tree3f3e8abbbddd868cd3553bb6d7e15d5667f266f6 /gmid.c
parent28778244d67be7024868a5095e5eedda22a3ed98 (diff)
s/uri/iri since we accept IRIs
Diffstat (limited to 'gmid.c')
-rw-r--r--gmid.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gmid.c b/gmid.c
index ef12066..0c1bed2 100644
--- a/gmid.c
+++ b/gmid.c
@@ -572,7 +572,7 @@ handle(struct pollfd *fds, struct client *client)
{
char buf[GEMINI_URL_LEN];
const char *parse_err;
- struct uri uri;
+ struct iri iri;
switch (client->state) {
case S_OPEN:
@@ -593,7 +593,7 @@ handle(struct pollfd *fds, struct client *client)
}
parse_err = "invalid request";
- if (!trim_req_uri(buf) || !parse_uri(buf, &uri, &parse_err)) {
+ if (!trim_req_iri(buf) || !parse_iri(buf, &iri, &parse_err)) {
if (!start_reply(fds, client, BAD_REQUEST, parse_err))
return;
goodbye(fds, client);
@@ -601,11 +601,11 @@ handle(struct pollfd *fds, struct client *client)
}
LOGI(client, "GET %s%s%s",
- *uri.path ? uri.path : "/",
- *uri.query ? "?" : "",
- *uri.query ? uri.query : "");
+ *iri.path ? iri.path : "/",
+ *iri.query ? "?" : "",
+ *iri.query ? iri.query : "");
- send_file(uri.path, uri.query, fds, client);
+ send_file(iri.path, iri.query, fds, client);
break;
case S_INITIALIZING: