From bbea55be6ca904d2ff7b6442d3a05127618d64d9 Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Sat, 6 May 2023 18:21:21 +0000 Subject: [PATCH] Document http-debug-server, fixed typo in HttpServer docs. --- TODO.txt | 5 +++-- man/man1/http-debug-server.1 | 18 ++++++++++++++++++ src/include/HttpServer.h | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 man/man1/http-debug-server.1 diff --git a/TODO.txt b/TODO.txt index c5ffb22..d83cc6e 100644 --- a/TODO.txt +++ b/TODO.txt @@ -29,7 +29,7 @@ Milestone: v0.3.0 [x] Uri [x] td [x] tt - [ ] http-debug-server + [x] http-debug-server [x] tp [x] send-patch [x] Log @@ -39,7 +39,7 @@ Milestone: v0.3.0 [x] Html [x] Str [x] HeaderParser - [ ] hdoc + [ ] hdoc(1) and hdoc(5) [x] telodendria-admin [x] telodendria-setup [x] telodendria-config @@ -64,6 +64,7 @@ Milestone: v0.3.0 Milestone: v0.4.0 ----------------- +[ ] Move general-purpose code to separate library [ ] HTTP/1.1 support [ ] Client-Server API diff --git a/man/man1/http-debug-server.1 b/man/man1/http-debug-server.1 new file mode 100644 index 0000000..f8c02da --- /dev/null +++ b/man/man1/http-debug-server.1 @@ -0,0 +1,18 @@ +.Dd $Mdocdate: May 6 2023 $ +.Dt HTTP-DEBUG-SERVER 1 +.Os Telodendria Project +.Sh NAME +.Nm http-debug-server +.Nd A simple HTTP server that logs requests to the standard output. +.Sh DESCRIPTION +.Pp +.Nm +spins up an HTTP server, listening on port 8008, in the exact same +manner as Telodendria itself. Any request it receives is written to +the standard output, and an empty JSON object is returned to the +client. +.Pp +This command exists just to test the HTTP server API during +development. It probably serves no other practical purpose. +.Sh SEE ALSO +.Xr HttpServer 3 diff --git a/src/include/HttpServer.h b/src/include/HttpServer.h index 868990f..37c6ef1 100644 --- a/src/include/HttpServer.h +++ b/src/include/HttpServer.h @@ -79,7 +79,7 @@ typedef void (HttpHandler) (HttpServerContext *, void *); /** * The number of arguments to * .Fn HttpServerCreate - * has grown so large that arguments are not stuffed into a + * has grown so large that arguments are now stuffed into a * configuration structure, which is in turn passed to * .Fn HttpServerCreate . * This configuration is copied by value into the internal