-
e269430d13
Replace while(true) loop with do ... while()
main
cdo
2022-10-15 20:23:07 +01:00
-
2f7fe23ee9
Flesh out README
cdo
2022-10-15 20:51:18 +01:00
-
726acba679
Add address and port command line parameters
cdo
2022-10-14 21:08:45 +01:00
-
e7dc81cfad
Forward-declare pledge() and unveil() on OpenBSD
cdo
2022-10-14 19:11:45 +01:00
-
1491d79b98
Use in6addr_loopback instead of IN6ADDR_LOOPBACK_INIT
cdo
2022-10-14 19:10:40 +01:00
-
ae35d05390
Define _POSIX_SOURCE before includes
cdo
2022-10-14 18:54:07 +01:00
-
f3c7f9e20a
Use pledge() and unveil() on OpenBSD
cdo
2022-10-14 17:36:40 +01:00
-
c200de7dc1
Register signal handler using sigaction() instead of signal()
cdo
2022-10-14 17:19:07 +01:00
-
7666e3a99a
Remove signed/unsigned comparisons
cdo
2022-10-14 15:40:04 +01:00
-
8bef1be5c4
Add a brief description to the README
cdo
2022-10-14 11:55:48 +01:00
-
4f9353ad86
Remove superfluous comment
cdo
2022-10-14 11:41:52 +01:00
-
076bda3dc3
Close files after sending
cdo
2022-10-14 11:41:43 +01:00
-
0311c858c3
Send incomplete response instead of dropping request for most errors
cdo
2022-10-14 11:38:47 +01:00
-
58c7b6feab
Terminate and send response outside of file/dir branch
cdo
2022-10-14 11:33:31 +01:00
-
120a97189f
Simplify Makefile
cdo
2022-10-14 11:24:55 +01:00
-
06d92b3d25
Handle file requests
cdo
2022-10-14 11:24:39 +01:00
-
5c21a0a8e2
Get directory response code to work with full resource path
cdo
2022-10-14 10:26:15 +01:00
-
543858d01d
Test whether requested resource is a file or directory
cdo
2022-10-14 10:20:38 +01:00
-
a3cdde2c34
Construct full path of requested resource
cdo
2022-10-13 17:56:41 +01:00
-
f6871a7922
Remove trailing slash from srvroot, if present
cdo
2022-10-13 17:10:53 +01:00
-
f171687fda
Add test srvroot directory to .gitignore
cdo
2022-10-13 17:08:50 +01:00
-
5c03ed950f
Send srvroot listing for empty selector
cdo
2022-10-13 17:00:08 +01:00
-
fa0dbed44c
Write an empty response to clients
cdo
2022-10-13 14:57:26 +01:00
-
1a13289da9
Improve error handling
cdo
2022-10-13 13:45:01 +01:00
-
f7583f538e
Read selector from client
cdo
2022-10-13 13:34:29 +01:00
-
2ab4966773
Add explanatory comments above each major block in main.c
cdo
2022-10-13 12:52:10 +01:00
-
88642c0c3f
Make accept() error handling a little neater
cdo
2022-10-13 12:08:49 +01:00
-
21de6cd3e7
Accept incoming connections inside main loop
cdo
2022-10-13 12:07:24 +01:00
-
b39e263499
Initialize socket before main loop
cdo
2022-10-13 12:06:25 +01:00
-
fffd1c3fff
Add main loop and signal handler
cdo
2022-10-13 11:57:29 +01:00
-
948c3971ee
Create project structure
cdo
2022-10-12 15:23:00 +01:00