| Fix http-compatibility stub. - geomyidae - A small C-based gopherd. | |
| git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri… | |
| Log | |
| Files | |
| Refs | |
| Tags | |
| README | |
| LICENSE | |
| --- | |
| commit 73b1a17ecfe53540e39ca60059235ce91c70c932 | |
| parent 3a876cbe4fb9b93ecf98decfa79e7f9b27dbc320 | |
| Author: Christoph Lohmann <[email protected]> | |
| Date: Sat, 22 Jul 2023 17:16:51 +0200 | |
| Fix http-compatibility stub. | |
| Diffstat: | |
| M main.c | 4 ++-- | |
| 1 file changed, 2 insertions(+), 2 deletions(-) | |
| --- | |
| diff --git a/main.c b/main.c | |
| @@ -191,11 +191,11 @@ handlerequest(int sock, char *req, int rlen, char *base, … | |
| * Try to guess if we have some HTTP-like protocol compatibility | |
| * mode. | |
| */ | |
| - if (!nocgi && recvb[0] != '/' && (c = strchr(recvb, " "))) { | |
| + if (!nocgi && recvb[0] != '/' && (c = strchr(recvb, ' '))) { | |
| *c = '\0'; | |
| if (strchr(recvb, '/')) | |
| goto dothegopher; | |
| - if (snprintf(path, "%s/%s", base, recvb) <= sizeof(path)) { | |
| + if (snprintf(path, sizeof(path), "%s/%s", base, recvb) <= size… | |
| if (realpath(path, (char *)rpath)) { | |
| if (stat(rpath, &dir)) { | |
| handlecgi(sock, rpath, port, base, NUL… |