diff options
author | cflip <cflip@cflip.net> | 2023-05-30 12:31:34 -0600 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2023-05-30 12:31:34 -0600 |
commit | 8dbdf132ea82a567d7cef856469fd47c511b4191 (patch) | |
tree | 66d87095b94b90a1a66946c0b514cfbe75ae1f10 /http.h | |
parent | 775c4157994ee0ebe9bd951a99bc5d7558128ba4 (diff) |
Refactor response building code
This new strategy involves finding the local file path for the given
URI, determining what method to use to fulfill the request (read file
from disk, use php-cgi, or error), then it writes the response to the
client socket.
Diffstat (limited to 'http.h')
-rw-r--r-- | http.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -11,8 +11,8 @@ enum http_req_method { }; enum http_res_code { - HTTP_RESPONSE_OK = 200, - HTTP_RESPONSE_NOTFOUND = 404 + HTTP_RESPONSE_OK, + HTTP_RESPONSE_NOTFOUND }; struct http_request { @@ -23,6 +23,6 @@ struct http_request { struct http_request http_parse_request(const char *); void http_free_request(struct http_request *); -int http_build_response(char *, enum http_res_code, const char *, size_t); +void http_response_statusline(enum http_res_code, int); #endif |