http-server.c

Basic HTTP server and router in C
git clone git://git.finwo.net/lib/http-server.c
Log | Files | Refs | README

commit 2cc5e66dc0c5f3f121106b445578ec49fadb1a2f
parent 0a812dc90e46a415b5cad8426d825bd0c79527b5
Author: Yersa Nordman <yersa@finwo.nl>
Date:   Thu,  7 Dec 2023 21:24:47 +0100

Removed debug prints

Diffstat:
Msrc/http-server.c | 8--------
1 file changed, 0 insertions(+), 8 deletions(-)

diff --git a/src/http-server.c b/src/http-server.c @@ -64,11 +64,6 @@ static void _hs_onRequest(struct http_parser_event *ev) { struct hs_route *route = registered_routes; struct hs_route *selected_route = NULL; - printf("Request detected: %s %s\n", - ev->request->method, - ev->request->path - ); - // Method/path matching, should be more intricate later (like /posts/:postId/comments) while(route) { if ( @@ -96,7 +91,6 @@ static void _hs_onRequest(struct http_parser_event *ev) { void _hs_onData(struct fnet_ev *ev) { struct http_server_reqdata *reqdata = ev->udata; - printf("Data received(%d): %s\n", ev->buffer->len, ev->buffer->data); http_parser_pair_request_data(reqdata->reqres, ev->buffer); } @@ -186,9 +180,7 @@ void http_server_main(struct http_server_opts *opts) { // This is a forever function, controlled by network thread while(!opts->shutdown) { - printf("(re)starting fnet_main\n"); ret = fnet_main(); - printf("fnet_main returned %d\n", ret); if (ret) exit(ret); sleep_ms(100); }