A minimal but flexible directory listing server
Find a file
Laslo Hunhold a5163d0813
Split up http_get_request()
The function has become too long and basically did two things: Receiving
the header and parsing it. To better reflect this, we split it up into
the two functions http_recv_header() and http_parse_header(). This way,
we also obtain a better separation of concerns and can further reduce
the scope of each parameter-list.

http_recv_header() has been written in such a way that it can be
reentered and fill up the header-buffer bit by bit using a pointer to
an offset value.

The error handling was improved by only returning the immediate error
status codes and letting the caller do the error-handling with
http_send_status().

Signed-off-by: Laslo Hunhold <dev@frign.de>
2020-08-22 11:05:20 +02:00
arg.h Correct arg.h license 2018-07-16 11:49:51 +02:00
config.def.h Specify UTF-8 for non-binary content-types 2019-01-02 17:04:23 +01:00
config.mk Be extra pedantic again and remove all warnings 2018-03-05 00:30:53 +01:00
http.c Split up http_get_request() 2020-08-22 11:05:20 +02:00
http.h Split up http_get_request() 2020-08-22 11:05:20 +02:00
LICENSE Use timegm() instead of mktime() to generate UNIX-timestamp 2020-07-23 16:48:34 +02:00
main.c Split up http_get_request() 2020-08-22 11:05:20 +02:00
Makefile Refactor the single source file into multiple modules 2018-02-04 21:27:33 +01:00
quark.1 Update manpage to list capabilities and behaviour 2020-08-18 08:46:52 +02:00
resp.c Replace off_t with size_t 2020-08-05 18:59:55 +02:00
resp.h Replace off_t with size_t 2020-08-05 18:59:55 +02:00
sock.c Ensure const-correctness where possible and refactor parse_range() 2020-08-05 18:28:21 +02:00
sock.h Ensure const-correctness where possible and refactor parse_range() 2020-08-05 18:28:21 +02:00
util.c Reduce global state by localizing the server-struct 2020-08-17 11:37:25 +02:00
util.h Reduce global state by localizing the server-struct 2020-08-17 11:37:25 +02:00