summary refs log tree commit diff
path: root/hittpd.c
Commit message (Collapse)AuthorAgeFilesLines
* accesslog: clean up, rename buf to logtimestampLeah Neukirchen2021-08-101-3/+4
|
* fix mimetype lookupLeah Neukirchen2021-08-101-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-bitsLeah Neukirchen2021-08-091-2/+2
|
* fix mimetype for "GET /" requestsÉrico Nogueira2021-08-091-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 robustnessLeah Neukirchen2021-06-031-1/+2
|
* detect unsatisfiable empty rangesLeah Neukirchen2021-06-031-0/+5
| | | | This fixes wget -c.
* bump copyright yearsLeah Neukirchen2021-06-031-1/+1
|
* reset stream state in finish_responseLeah Neukirchen2021-06-031-0/+5
| | | | | This fixes wrong partial content answers on keep-alive requests, detected with mobile Chrome 89.
* Partial Content is 206, duhLeah Neukirchen2020-09-251-1/+1
|
* with -P, only list files that will be servedLeah Neukirchen2020-05-231-0/+3
|
* nicer index list, inspired by nginxLeah Neukirchen2020-05-231-14/+39
|
* remove double casting via (void *)Leah Neukirchen2020-05-201-5/+4
|
* fix formattingLeah Neukirchen2020-05-151-19/+19
|
* detect file truncationLeah Neukirchen2020-05-151-2/+6
| | | | We have to close the connection here to notify the client.
* display address hittpd listens onLeah Neukirchen2020-05-151-5/+21
|
* add -R to set SO_REUSEPORTLeah Neukirchen2020-05-101-2/+13
|
* compute timestamp once per iterationLeah Neukirchen2020-05-101-9/+9
|
* ignore peer address when acceptingLeah Neukirchen2020-05-101-5/+3
|
* better error handling in write_clientLeah Neukirchen2020-05-091-7/+11
|
* allow setting default mimetype, default to application/octet-streamLeah Neukirchen2020-05-091-6/+6
|
* allow custom mime typesLeah Neukirchen2020-05-091-2/+7
|
* nicely exit on SIGINT and SIGTERMLeah Neukirchen2020-05-091-3/+28
|
* good morningLeah Neukirchen2020-05-091-3/+3
|
* add -P to only serve world-readable filesLeah Neukirchen2020-05-091-2/+9
| | | | | Note that this does not check intermediate directory traversals, for this u+x is still enough.
* add -I to disable directory indexesLeah Neukirchen2020-05-091-2/+7
|
* send_dir_redirect: send newline tooLeah Neukirchen2020-05-091-1/+1
|
* escape path in accesslogLeah Neukirchen2020-05-091-3/+10
|
* detect too big header generationLeah Neukirchen2020-05-091-1/+12
|
* fix empty Content-Length for HEADLeah Neukirchen2020-05-091-3/+3
|
* send content for 301 responsesLeah Neukirchen2020-05-091-2/+3
|
* refactor response generationLeah Neukirchen2020-05-091-106/+57
|
* send_error: refactorLeah Neukirchen2020-05-091-7/+15
|
* use intmax_t to print off_t valuesLeah Neukirchen2020-05-091-12/+22
|
* add support for listening on unix domain sockets (-u)Leah Neukirchen2020-05-091-31/+50
|
* use AF_UNSPEC if AI_V4MAPPED is not availableLeah Neukirchen2020-05-091-3/+5
| | | | Else we can't listen IPv4 only on these systems.
* rename OPEN_MAX to MAX_CLIENTSLeah Neukirchen2020-05-081-8/+7
|
* use AI_V4MAPPED only if availableLeah Neukirchen2020-05-081-1/+4
|
* add strptime prototype for glibc, use default visibilityLeah Neukirchen2020-05-081-3/+5
|
* simply enable sendfile on linuxLeah Neukirchen2020-05-081-2/+2
|
* shortcut for send_errorLeah Neukirchen2020-05-081-53/+30
|
* refactor hex decodingLeah Neukirchen2020-05-081-18/+17
|
* rewrite parse_rangeLeah Neukirchen2020-05-081-11/+36
| | | | Reject overflows and whitespace.
* detect and report ENAMETOOLONGLeah Neukirchen2020-05-081-0/+2
|
* detect overflow during percent decodingLeah Neukirchen2020-05-081-1/+6
|
* send_dir_redirect: increase response buffer, detect truncationLeah Neukirchen2020-05-081-30/+35
| | | | Thanks @duncaen.
* on_url: can be called multiple times for long URLsLeah Neukirchen2020-05-081-1/+6
|
* ignore duplicate headersLeah Neukirchen2020-05-081-2/+2
| | | | | | Fixes a memory leak. Thanks @duncaen.
* for vhost, detect Host: . and empty Host:Leah Neukirchen2020-05-081-1/+1
| | | | Thanks @duncaen.
* escape # in urls (else potentially HTML anchors)Leah Neukirchen2020-05-081-0/+1
|
* skip query parameters when parsing file nameLeah Neukirchen2020-05-081-0/+2
|