diff options
author | cflip <cflip@cflip.net> | 2023-06-08 14:49:46 -0600 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2023-06-08 14:49:46 -0600 |
commit | 442cf41129d516188f52050c48f806b24450a3a3 (patch) | |
tree | 10ca8b9e08bd2d8ff60be68014ae3568b0f6c6b5 /cfws.c | |
parent | 8724eb379bcda51e7a9ecaaa6698a699ac042621 (diff) |
Support POST requests for PHP scripts
This makes it possible to both read from and write to the standard I/O
in php-cgi so that the request body can be written to its stdin and the
script can access POST request data.
Unfortunately, this isn't quite enough for the user login on the cflip
forum to work, since cookies (and other HTTP headers) aren't passed to
the script yet.
Diffstat (limited to 'cfws.c')
-rw-r--r-- | cfws.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -69,7 +69,7 @@ static void handle_request(const struct http_request *req, int sockfd) file_read(filepath, sockfd); break; case SERVE_METHOD_PHP: - file_read_php(filepath, req->query_str, sockfd); + file_read_php(filepath, req, sockfd); break; case SERVE_METHOD_ERROR: { const char *errmsg = "Content-Type: text/plain\r\n\r\nEpic fail"; |