Drew DeVault
1f229ba123
mime: add .xml -> text/xml
2020-09-27 00:46:38 -04:00
Drew DeVault
71bbd1b315
server.c: re-locate definitions to appropriate scope
2020-09-26 18:54:32 -04:00
Drew DeVault
f3075e4bbd
README.md: update example config
2020-09-26 18:51:24 -04:00
Drew DeVault
57893ff09c
Set SO_REUSEADDR
2020-09-26 18:24:32 -04:00
Drew DeVault
f6602ddd08
server.c: appease GCC's magic pixie bullshit
2020-09-26 18:13:11 -04:00
Drew DeVault
6d866ba3df
server.c: import netinet/in.h
2020-09-26 17:54:40 -04:00
Drew DeVault
53bf5bc54f
config.ini: change suggested root directory
2020-09-26 17:46:56 -04:00
Drew DeVault
534efe8e34
Fix size of in{,6}_addr
2020-09-26 17:33:13 -04:00
Drew DeVault
814a6e7657
Document (and tweak) log format
2020-09-26 17:02:06 -04:00
Drew DeVault
c601583f7d
README.md: formatting
2020-09-26 16:46:07 -04:00
Drew DeVault
a35a910c63
Add dependency list
2020-09-26 16:45:43 -04:00
Drew DeVault
0933880b2b
Documentation
2020-09-26 16:45:06 -04:00
Drew DeVault
fc036335eb
Remove [:tls] email directive
2020-09-26 16:41:11 -04:00
Drew DeVault
50d21c03f5
Free up resources throughout
2020-09-26 16:10:10 -04:00
Drew DeVault
e9641dbf1e
disconnect_client: free more client resources
2020-09-26 15:53:37 -04:00
Drew DeVault
6bc9c4deb9
Implement autoindex option
2020-09-26 15:51:28 -04:00
Drew DeVault
165e3c02fc
Rehome some logic from server.c -> serve.c
2020-09-26 15:08:25 -04:00
Drew DeVault
61bc033740
Okay, time to quit fucking around with BUFSIZ
2020-09-26 15:00:40 -04:00
Drew DeVault
d4d8ea646c
Turns out BUFSIZ is small sometimes
2020-09-26 14:56:18 -04:00
Drew DeVault
48f75abcfd
Bump client buffer size to BUFSIZ
2020-09-26 14:45:39 -04:00
Drew DeVault
9bed26b8d9
Log response body size in bytes
2020-09-26 14:41:17 -04:00
Drew DeVault
dfab99ace5
Serve files from root
2020-09-26 14:36:52 -04:00
Drew DeVault
0d6eca2c79
disconnect_client: clean up bios
2020-09-26 13:58:51 -04:00
Drew DeVault
264c3b4602
Always log server messages to stderr
...
So that you can just direct stdout to a file to get the request log.
2020-09-26 13:40:20 -04:00
Drew DeVault
ce467cebd3
Parse requests and serve simple responses
2020-09-26 13:39:37 -04:00
Drew DeVault
5388725d41
Use O_NONBLOCK for client file descriptors
2020-09-26 10:53:22 -04:00
Drew DeVault
fa69887e52
Implement TLS exchange with clients
...
This probably leaves a bit to be desired tbh
2020-09-24 19:58:41 -04:00
Drew DeVault
7af04ea471
tls: move cert/key into host structure
...
We'll later want to set these on the SSL object (rather than SSL_CTX),
so move these into the host struct for later access.
We'll prefer to set it on the SSL object so that we can automatically
use an up-to-date certificate, per ~sircmpwn/gmni#26.
2020-09-24 17:55:10 -04:00
Drew DeVault
0d1137f987
Implement TLS store
...
Includes hands-free certificate generation and loading
2020-09-24 17:51:29 -04:00
Eyal Sawady
e15aca171d
configure: add --libdir
2020-09-24 14:43:16 -04:00
Drew DeVault
85a85b37f8
Log bind addresses on startup
2020-09-24 11:16:51 -04:00
Drew DeVault
b14e33c349
Add README.md
2020-09-24 11:11:48 -04:00
Drew DeVault
b85c64b441
Generalize logging
2020-09-23 14:32:52 -04:00
Drew DeVault
da9db7bc46
Implement basic server event loop
2020-09-23 14:19:28 -04:00
Drew DeVault
f88d817dca
Generalize IPV6_V6ONLY usage
...
Some platforms other than Linux may implement this socket option.
2020-09-23 12:44:42 -04:00
Drew DeVault
65c2a56c6d
Initialize sockets
2020-09-23 12:43:05 -04:00
Drew DeVault
9adc6f34c7
config: parse listen directives
2020-09-23 11:33:05 -04:00
Drew DeVault
58500c8e53
Initial config parser
2020-09-23 11:24:23 -04:00
Drew DeVault
ccae8ffd28
Vendor in some support code
2020-09-23 10:40:14 -04:00
Drew DeVault
61b84a77c0
Initial commit
2020-09-23 10:21:44 -04:00