diff --git a/CHANGELOG.md b/CHANGELOG.md index d358bd0..ea9588b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://git.rustybever.be/Chewing_Bever/lander/src/branch/dev) -### Changed +### Added -* HTTP Loop - * Responses can now have an arbitrary number of headers +* LNM - Lander Network Module + * Rewrite of the event loop & HTTP loop + * Fully independent library + * Numerous improvements + * Streaming of headers + * Allow custom & an arbitrary number of response headers + * Better API for adding routes + * State machine HTTP loop ## [0.2.0](https://git.rustybever.be/Chewing_Bever/lander/src/tag/0.2.0) diff --git a/lnm/src/http/lnm_http_req.c b/lnm/src/http/lnm_http_req.c index a601e32..853a33e 100644 --- a/lnm/src/http/lnm_http_req.c +++ b/lnm/src/http/lnm_http_req.c @@ -49,12 +49,13 @@ lnm_http_parse_err lnm_http_req_parse(lnm_http_req *req, char *buf, req->query.len = path_len - (question_mark + 1 - path); path_len = question_mark - path; + + // All parsed strings should be null-terminated. This character is either a + // newline (if at the end of the path), or a question mark (if a query is + // present). + path[path_len] = '\0'; } - // All parsed strings should be null-terminated. This character is either a - // newline (if at the end of the path), or a question mark (if a query is - // present). - path[path_len] = '\0'; req->path.len = path_len; req->path.s = path; req->len = req_len; diff --git a/lnm/src/loop/lnm_loop.c b/lnm/src/loop/lnm_loop.c index a412b23..350eb9b 100644 --- a/lnm/src/loop/lnm_loop.c +++ b/lnm/src/loop/lnm_loop.c @@ -2,8 +2,8 @@ #include #include #include -#include #include +#include #include "lnm/common.h" #include "lnm/loop_internal.h"