diff options
author | cflip <cflip@cflip.net> | 2023-07-14 19:16:02 -0600 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2023-07-14 19:16:02 -0600 |
commit | 555f21649b909fd37a6153843249d72ca80ac427 (patch) | |
tree | 32b0a646b81d89278bf3769be0a971fb7729ac78 /file.h | |
parent | 8ddca3948791d484614f1b2a753f04c478072050 (diff) |
Run executable files as CGI scripts
Now if the server encounters an executable file that doesn't have a .php
extension, it will run it as a CGI script. There should maybe be better
heuristics for determining whether a file actually is a CGI script
(sometimes files copied from Windows can be marked as executable) but
this works for now.
Diffstat (limited to 'file.h')
-rw-r--r-- | file.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -8,6 +8,7 @@ enum serve_method { SERVE_METHOD_FILE, SERVE_METHOD_PHP, + SERVE_METHOD_CGI, SERVE_METHOD_ERROR }; @@ -16,6 +17,6 @@ const char *file_path_for_uri(const char *); enum serve_method file_method_for_path(const char *, enum http_res_code *); int file_read(const char *, int); -int file_read_php(const char *, const struct http_request *, int); +int file_read_cgi(const char *, const char *, const struct http_request *, int); #endif |