Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | accesslog: clean up, rename buf to logtimestamp | Leah Neukirchen | 2021-08-10 | 1 | -3/+4 |
| | |||||
* | fix mimetype lookup | Leah Neukirchen | 2021-08-10 | 1 | -12/+26 |
| | | | | | | | Fix overflow on long mime types, found by Érico Nogueira. Allow maximum length of mime types, as per spec, then truncate. Fix mime type lookup when extensions match some mime type. | ||||
* | scan_int64: don't assume long fits 64-bits | Leah Neukirchen | 2021-08-09 | 1 | -2/+2 |
| | |||||
* | fix mimetype for "GET /" requests | Érico Nogueira | 2021-08-09 | 1 | -1/+6 |
| | | | | | | | index.html was being sent as "application/octet-stream", which broke it for browsers. using strcat is safe, because we check the length before writing. we can't use strcpy because subdirs can also be requested this way. | ||||
* | more robustness | Leah Neukirchen | 2021-06-03 | 1 | -1/+2 |
| | |||||
* | detect unsatisfiable empty ranges | Leah Neukirchen | 2021-06-03 | 1 | -0/+5 |
| | | | | This fixes wget -c. | ||||
* | bump copyright years | Leah Neukirchen | 2021-06-03 | 1 | -1/+1 |
| | |||||
* | reset stream state in finish_response | Leah Neukirchen | 2021-06-03 | 1 | -0/+5 |
| | | | | | This fixes wrong partial content answers on keep-alive requests, detected with mobile Chrome 89. | ||||
* | Partial Content is 206, duh | Leah Neukirchen | 2020-09-25 | 1 | -1/+1 |
| | |||||
* | with -P, only list files that will be served | Leah Neukirchen | 2020-05-23 | 1 | -0/+3 |
| | |||||
* | nicer index list, inspired by nginx | Leah Neukirchen | 2020-05-23 | 1 | -14/+39 |
| | |||||
* | remove double casting via (void *) | Leah Neukirchen | 2020-05-20 | 1 | -5/+4 |
| | |||||
* | fix formatting | Leah Neukirchen | 2020-05-15 | 1 | -19/+19 |
| | |||||
* | detect file truncation | Leah Neukirchen | 2020-05-15 | 1 | -2/+6 |
| | | | | We have to close the connection here to notify the client. | ||||
* | display address hittpd listens on | Leah Neukirchen | 2020-05-15 | 1 | -5/+21 |
| | |||||
* | add -R to set SO_REUSEPORT | Leah Neukirchen | 2020-05-10 | 1 | -2/+13 |
| | |||||
* | compute timestamp once per iteration | Leah Neukirchen | 2020-05-10 | 1 | -9/+9 |
| | |||||
* | ignore peer address when accepting | Leah Neukirchen | 2020-05-10 | 1 | -5/+3 |
| | |||||
* | better error handling in write_client | Leah Neukirchen | 2020-05-09 | 1 | -7/+11 |
| | |||||
* | allow setting default mimetype, default to application/octet-stream | Leah Neukirchen | 2020-05-09 | 1 | -6/+6 |
| | |||||
* | allow custom mime types | Leah Neukirchen | 2020-05-09 | 1 | -2/+7 |
| | |||||
* | nicely exit on SIGINT and SIGTERM | Leah Neukirchen | 2020-05-09 | 1 | -3/+28 |
| | |||||
* | good morning | Leah Neukirchen | 2020-05-09 | 1 | -3/+3 |
| | |||||
* | add -P to only serve world-readable files | Leah Neukirchen | 2020-05-09 | 1 | -2/+9 |
| | | | | | Note that this does not check intermediate directory traversals, for this u+x is still enough. | ||||
* | add -I to disable directory indexes | Leah Neukirchen | 2020-05-09 | 1 | -2/+7 |
| | |||||
* | send_dir_redirect: send newline too | Leah Neukirchen | 2020-05-09 | 1 | -1/+1 |
| | |||||
* | escape path in accesslog | Leah Neukirchen | 2020-05-09 | 1 | -3/+10 |
| | |||||
* | detect too big header generation | Leah Neukirchen | 2020-05-09 | 1 | -1/+12 |
| | |||||
* | fix empty Content-Length for HEAD | Leah Neukirchen | 2020-05-09 | 1 | -3/+3 |
| | |||||
* | send content for 301 responses | Leah Neukirchen | 2020-05-09 | 1 | -2/+3 |
| | |||||
* | refactor response generation | Leah Neukirchen | 2020-05-09 | 1 | -106/+57 |
| | |||||
* | send_error: refactor | Leah Neukirchen | 2020-05-09 | 1 | -7/+15 |
| | |||||
* | use intmax_t to print off_t values | Leah Neukirchen | 2020-05-09 | 1 | -12/+22 |
| | |||||
* | add support for listening on unix domain sockets (-u) | Leah Neukirchen | 2020-05-09 | 1 | -31/+50 |
| | |||||
* | use AF_UNSPEC if AI_V4MAPPED is not available | Leah Neukirchen | 2020-05-09 | 1 | -3/+5 |
| | | | | Else we can't listen IPv4 only on these systems. | ||||
* | rename OPEN_MAX to MAX_CLIENTS | Leah Neukirchen | 2020-05-08 | 1 | -8/+7 |
| | |||||
* | use AI_V4MAPPED only if available | Leah Neukirchen | 2020-05-08 | 1 | -1/+4 |
| | |||||
* | add strptime prototype for glibc, use default visibility | Leah Neukirchen | 2020-05-08 | 1 | -3/+5 |
| | |||||
* | simply enable sendfile on linux | Leah Neukirchen | 2020-05-08 | 1 | -2/+2 |
| | |||||
* | shortcut for send_error | Leah Neukirchen | 2020-05-08 | 1 | -53/+30 |
| | |||||
* | refactor hex decoding | Leah Neukirchen | 2020-05-08 | 1 | -18/+17 |
| | |||||
* | rewrite parse_range | Leah Neukirchen | 2020-05-08 | 1 | -11/+36 |
| | | | | Reject overflows and whitespace. | ||||
* | detect and report ENAMETOOLONG | Leah Neukirchen | 2020-05-08 | 1 | -0/+2 |
| | |||||
* | detect overflow during percent decoding | Leah Neukirchen | 2020-05-08 | 1 | -1/+6 |
| | |||||
* | send_dir_redirect: increase response buffer, detect truncation | Leah Neukirchen | 2020-05-08 | 1 | -30/+35 |
| | | | | Thanks @duncaen. | ||||
* | on_url: can be called multiple times for long URLs | Leah Neukirchen | 2020-05-08 | 1 | -1/+6 |
| | |||||
* | ignore duplicate headers | Leah Neukirchen | 2020-05-08 | 1 | -2/+2 |
| | | | | | | Fixes a memory leak. Thanks @duncaen. | ||||
* | for vhost, detect Host: . and empty Host: | Leah Neukirchen | 2020-05-08 | 1 | -1/+1 |
| | | | | Thanks @duncaen. | ||||
* | escape # in urls (else potentially HTML anchors) | Leah Neukirchen | 2020-05-08 | 1 | -0/+1 |
| | |||||
* | skip query parameters when parsing file name | Leah Neukirchen | 2020-05-08 | 1 | -0/+2 |
| |