summaryrefslogtreecommitdiffstats
path: root/src/server.c
Commit message (Collapse)AuthorAgeFilesLines
* Close some files when too many are openRemy Noulin2022-12-191-0/+11
|
* notify clients about malformed requestsJulian Maingot2022-08-151-1/+4
| | | | | | | I think this has been broken for a while and I came across it while implementing my own client. The server should notify the client that the request is malformed but wasn't sending the response when SSL_read returned SSL_ERROR_WANT_READ.
* disconnect_client: fix index calculationEyal Sawady2021-05-161-1/+1
| | | | | | This was sometimes causing a gmnisrv_client to be overwritten by the deinitialized client, which occasionally lead to a segfault when we later tried to use it.
* Fix use of wrong index during pollfd refreshKenny Levinsen2020-11-101-1/+1
| | | | | | The right side of the refresh ended up using the index of the deleted client instead of the index from the loop, which happens to work when the destroyed client is either last or second-last.
* Update pollfd pointers when destroying a clientKenny Levinsen2020-11-081-0/+4
| | | | | | | | The client pollfd pointer would go stale when the server pollfd array was moved to compensate for a destroyed client, which in turn led to poll breakage. Refresh the pollfd pointers after memmove.
* Prevent double free of client resourcesDrew DeVault2020-11-081-0/+4
|
* Set POLLOUT only when there's something to writembays2020-11-081-1/+1
|
* Don't memmove one past clientsTom Lebreux2020-11-081-1/+3
|
* Fix not moving all fdsTom Lebreux2020-11-081-1/+1
|
* server: handle write errorsDrew DeVault2020-10-281-1/+5
|
* Overhaul network I/O to be async for realDrew DeVault2020-10-251-91/+217
| | | | | Had to totally cut off OpenSSL from the network fd because obviously OpenSSL is just going to wreck our shit
* Bubble up client disconnect stateDrew DeVault2020-09-271-23/+36
| | | | This will fix the segfaults but won't fix slowlorris
* Break after processing polled clientDrew DeVault2020-09-271-0/+3
| | | | Otherwise we might not grok it, ya jive
* Only handle one client per poll iterationDrew DeVault2020-09-271-8/+4
| | | | | This is a bit of a hack but it avoids some problems with invalid reads when a client gets disconnected
* server.c: re-locate definitions to appropriate scopeDrew DeVault2020-09-261-7/+7
|
* Set SO_REUSEADDRDrew DeVault2020-09-261-1/+2
|
* server.c: appease GCC's magic pixie bullshitDrew DeVault2020-09-261-2/+2
|
* server.c: import netinet/in.hDrew DeVault2020-09-261-0/+1
|
* Fix size of in{,6}_addrDrew DeVault2020-09-261-2/+2
|
* Document (and tweak) log formatDrew DeVault2020-09-261-3/+2
|
* Free up resources throughoutDrew DeVault2020-09-261-4/+14
|
* disconnect_client: free more client resourcesDrew DeVault2020-09-261-0/+7
|
* Implement autoindex optionDrew DeVault2020-09-261-6/+5
|
* Rehome some logic from server.c -> serve.cDrew DeVault2020-09-261-119/+1
|
* Bump client buffer size to BUFSIZDrew DeVault2020-09-261-1/+0
|
* Log response body size in bytesDrew DeVault2020-09-261-1/+4
|
* Serve files from rootDrew DeVault2020-09-261-11/+82
|
* disconnect_client: clean up biosDrew DeVault2020-09-261-2/+3
|
* Parse requests and serve simple responsesDrew DeVault2020-09-261-17/+169
|
* Use O_NONBLOCK for client file descriptorsDrew DeVault2020-09-261-2/+13
|
* Implement TLS exchange with clientsDrew DeVault2020-09-241-6/+99
| | | | This probably leaves a bit to be desired tbh
* Log bind addresses on startupDrew DeVault2020-09-241-1/+4
|
* Generalize loggingDrew DeVault2020-09-231-28/+5
|
* Implement basic server event loopDrew DeVault2020-09-231-4/+180
|
* Generalize IPV6_V6ONLY usageDrew DeVault2020-09-231-1/+1
| | | | Some platforms other than Linux may implement this socket option.
* Initialize socketsDrew DeVault2020-09-231-0/+92