From f10931042fd694ee886f55a518182a34d7cd4f6d Mon Sep 17 00:00:00 2001 From: hugogogo Date: Mon, 8 Aug 2022 16:16:11 +0200 Subject: [PATCH] rewrite readme cgi todo list --- README.md | 18 ++++++++++++++++++ srcs/webserv/response.cpp | 12 ------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 889abb5..453b0df 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,24 @@ ## work together +#### output cgi script : +! TODO : change all the '\n' by '\r\n' +! TODO : there is at least one header field followed by '\r\n\r\n' : + - "Content-Type" + - "Location" + - "Status" +-> TODO : there is no field duplicate (resolve conflicts) +-> TODO : if status field, change server status for this one +! TODO : there is no space between filed name and ":" +! TODO : if no Location field && no Status field -> status code = 200 +! TODO?: handle Location field, either : + - local : start with '/' --> rerun the request with new uri + - client : start with ':' --> send back status code 302 + +#### what cgi ? +- a basic form with "name" and "something", that return a html page with that +- a script called by a file extension in URI + #### questions - in client.cpp i fill the port, is there a default one in case it's not in the request ? - timeout server but still works ? diff --git a/srcs/webserv/response.cpp b/srcs/webserv/response.cpp index ed08d6f..e86761b 100644 --- a/srcs/webserv/response.cpp +++ b/srcs/webserv/response.cpp @@ -227,18 +227,6 @@ void Webserv::_get_file(Client *client, const std::string &path) // WIP HUGO void Webserv::_response_correction(Client *client) { - // TODO : change all the '\n' by '\r\n' - // TODO : there is at least one header field followed by '\r\n\r\n' : - // - "Content-Type" - // - "Location" - // - "Status" - // TODO : there is no field duplicate (resolve conflicts) - // TODO : there is no space between filed name and ":" - // TODO : if no Location field && no Status field -> status code = 200 - // TODO?: handle Location field, either : - // - local : start with '/' --> rerun the request with new uri - // - client : start with ':' --> send back status code 302 - (void)client; }