hermes

HTTP GET/HEAD-only web server for static content.
git clone git://git.francescosaccone.com/hermes
Log | Files | Refs | README | LICENSE

commit 51d807674efc7363a54e4cc945f1bdb0b1e81b76
parent 0025e8fe47445fbc1cb1791ccef46797de30abe6
Author: Francesco Saccone <francesco@francescosaccone.com>
Date:   Mon, 31 Mar 2025 20:12:14 +0200

fix: set method to UNSUPPORTED instead of returning NULL

Signed-off-by: Francesco Saccone <francesco@francescosaccone.com>

Diffstat:
Mhttp.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/http.c b/http.c @@ -21,9 +21,7 @@ parse_http_request(char *request) { } else if (strcmp(method_string, "HEAD") == 0) { result->method = HEAD; } else { - /* only GET and HEAD are supported */ - free(result); - return NULL; + result->method = UNSUPPORTED; } }