Compare commits
2 commits
81c1123b7f
...
80b1d49e74
Author | SHA1 | Date | |
---|---|---|---|
80b1d49e74 | |||
53b3974d58 |
3 changed files with 18 additions and 3 deletions
14
Changelog.md
Normal file
14
Changelog.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
## Latest Changes
|
||||||
|
|
||||||
|
## Version 1.0
|
||||||
|
|
||||||
|
First release.
|
||||||
|
|
||||||
|
Features:
|
||||||
|
|
||||||
|
- Serve templated html files via a config.
|
||||||
|
- Reload configuration on SIGUSR1 or by listening (enabled by cmd parameter).
|
||||||
|
- Cache served html (enabled by cmd parameter).
|
||||||
|
- Serve static files from "static-dir" (enabled by cmd parameter).
|
|
@ -16,6 +16,10 @@ A simple HTTP/1.1 server written in C.
|
||||||
--cache-entry-lifetime-seconds=<SECONDS>
|
--cache-entry-lifetime-seconds=<SECONDS>
|
||||||
--enable-static-dir=<DIR>
|
--enable-static-dir=<DIR>
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
See the [Changelog.](https://git.seodisparate.com/stephenseo/c_simple_http/src/branch/main/Changelog.md)
|
||||||
|
|
||||||
## Before Compiling
|
## Before Compiling
|
||||||
|
|
||||||
Make sure that the git submodule(s) are loaded:
|
Make sure that the git submodule(s) are loaded:
|
||||||
|
|
|
@ -232,8 +232,6 @@ int c_simple_http_helper_mkdir_tree(const char *path) {
|
||||||
return 1;
|
return 1;
|
||||||
} else if (errno == ENOENT) {
|
} else if (errno == ENOENT) {
|
||||||
// Directory doesn't exist, create dir tree.
|
// Directory doesn't exist, create dir tree.
|
||||||
closedir(dir_ptr);
|
|
||||||
|
|
||||||
size_t buf_size = strlen(path) + 1;
|
size_t buf_size = strlen(path) + 1;
|
||||||
char *buf = malloc(buf_size);
|
char *buf = malloc(buf_size);
|
||||||
memcpy(buf, path, buf_size - 1);
|
memcpy(buf, path, buf_size - 1);
|
||||||
|
@ -256,7 +254,6 @@ int c_simple_http_helper_mkdir_tree(const char *path) {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
// Other directory error.
|
// Other directory error.
|
||||||
closedir(dir_ptr);
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue