From 89cc41f28a7af657979df511ffa6136f411844e5 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Tue, 12 Dec 2023 12:15:21 +0100 Subject: [PATCH] chore(lander): move a log line --- CHANGELOG.md | 2 +- lnm/src/http/lnm_http_loop_process.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e199b61..92635f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Allow custom & an arbitrary number of response headers * Better API for adding routes * State machine HTTP loop - * Auomatically support HEAD requests for all GET requests + * Automatically support HEAD requests for all GET requests * Landerctl * `-c` flag to use custom config file (useful for testing) diff --git a/lnm/src/http/lnm_http_loop_process.c b/lnm/src/http/lnm_http_loop_process.c index 4cfa6f7..62cea3f 100644 --- a/lnm/src/http/lnm_http_loop_process.c +++ b/lnm/src/http/lnm_http_loop_process.c @@ -27,6 +27,10 @@ void lnm_http_loop_process_parse_req(lnm_http_conn *conn) { case lnm_http_parse_err_ok: conn->r.read += ctx->req.len; ctx->state = lnm_http_loop_state_route; + + lnm_linfo(section, "%s %.*s HTTP/1.%i", + lnm_http_method_names[ctx->req.method], (int)ctx->req.path.len, + ctx->req.path.s, ctx->req.minor_version); break; case lnm_http_parse_err_incomplete: // If the request is already the size of the read buffer, we close the @@ -48,10 +52,6 @@ void lnm_http_loop_process_parse_req(lnm_http_conn *conn) { ctx->state = lnm_http_loop_state_first_res; break; } - - lnm_linfo(section, "%s %.*s HTTP/1.%i", - lnm_http_method_names[ctx->req.method], (int)ctx->req.path.len, - ctx->req.path.s, ctx->req.minor_version); } void lnm_http_loop_process_route(lnm_http_conn *conn) {