Commit graph

22 commits

Author SHA1 Message Date
67f59e1354 Add option --enable-static-dir=<DIR>, use static
Some checks failed
Run Unit Tests / build-and-run-unit-tests (push) Failing after 55s
2024-10-30 14:17:49 +09:00
700adf2f7b Impl. cache file lifetime checking
By default cache files are invalidated when the are aged for longer than
1 week. This "timeout-time" can be modified with a paramter/argument.
2024-09-26 12:37:45 +09:00
9459ec9313 Reload config file if cache is older than config
Some checks failed
Run Unit Tests / build-and-run-unit-tests (push) Failing after 6s
2024-09-26 11:51:42 +09:00
83e4a51985 Impl. html cache (mostly done)
Some checks failed
Run Unit Tests / build-and-run-unit-tests (push) Failing after 4s
TODO: Invalidate cache if it is too old.
2024-09-25 16:12:25 +09:00
856c205f31 Unescape percent-encoded uri when handling request
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 8s
Resolves #6
2024-09-24 13:16:34 +09:00
fdaaf04600 Use "Connection: close" in response headers
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 8s
The current implementation always closes the connection after sending
the response, so it should notify the client to close the connection.
2024-09-23 19:44:51 +09:00
abc61a5504 Impl. path-to-cache-filename, fixes to strip-path
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 8s
2024-09-23 14:58:28 +09:00
7a8582faac Change template generation: output used filenames 2024-09-22 14:26:07 +09:00
13ccc1b3bd Use stdint.h types instead of int, long, etc.
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 7s
2024-09-20 21:45:51 +09:00
f15452baa4 Fix case where URL has extra trailing '/'
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 8s
2024-09-16 11:20:15 +09:00
952808aefc Minor fixes/cleanup
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
2024-09-09 13:53:58 +09:00
3bace3286f Refactor "print request headers"
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 2s
Resolves #1
2024-09-09 12:41:15 +09:00
9294108f13 Impl. print of specific headers arg/option
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 2s
TODO: Maybe refactor this to use a hash-map or something similar to
speed up the process. If N = number-of-headers-to-print and M =
size-of-request-buffer, then currrently this will take O(N*M) time.
2024-09-06 17:30:37 +09:00
c9c21105f6 Only allow protocol "HTTP/1.1"
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 33s
2024-09-06 15:57:46 +09:00
c194555527 Add support for different error responses 2024-09-06 15:55:21 +09:00
42d97e03b3 Remove "?" or "#" starting suffixes from path
These suffixes may break loading the correct html template.
2024-09-06 15:33:31 +09:00
9be6ac32bf Impl. handling HTTP/1.1 requests
TODO:
    Handle errors other than 404 Not Found.
2024-09-06 11:56:00 +09:00
0b9f0e38f8 WIP some work on http req/response handling 2024-09-02 13:51:10 +09:00
f5507c8412 Move config-related code from http.c to config.c
Also make config-related code more generic and improve unit tests of
config parsing.
2024-08-31 16:48:24 +09:00
edffbf0656 Cleanup usage of third-party headers 2024-08-31 14:43:53 +09:00
b4a56a7918 WIP Impl. config file parsing for http templates
TODO:
    Still need to test "HTML_FILE".
    Response to HTTP request.
2024-08-30 18:11:03 +09:00
efd4b39311 WIP html template handling for http response
TODO:
    Test html template handling so that it works.
    Respond to http requests properly.
2024-08-30 14:16:20 +09:00