summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorcflip <cflip@cflip.net>2023-05-30 12:31:34 -0600
committercflip <cflip@cflip.net>2023-05-30 12:31:34 -0600
commit8dbdf132ea82a567d7cef856469fd47c511b4191 (patch)
tree66d87095b94b90a1a66946c0b514cfbe75ae1f10 /http.h
parent775c4157994ee0ebe9bd951a99bc5d7558128ba4 (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.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/http.h b/http.h
index 1e97820..3cdc062 100644
--- a/http.h
+++ b/http.h
@@ -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