diff options
author | Omar Polo <op@omarpolo.com> | 2021-01-11 13:08:00 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-01-11 13:08:00 +0000 |
commit | 3c1cf9d07cb679ba444566159538b510902f2de9 (patch) | |
tree | 3f3e8abbbddd868cd3553bb6d7e15d5667f266f6 /gmid.c | |
parent | 28778244d67be7024868a5095e5eedda22a3ed98 (diff) |
s/uri/iri since we accept IRIs
Diffstat (limited to 'gmid.c')
-rw-r--r-- | gmid.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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: |