modif and added several scipts for testing cgi

+ modif html page for script tests
+ script output not added to response in case of http error
This commit is contained in:
Hugo LAMY
2022-08-16 01:39:46 +02:00
parent c05536ca01
commit 8c2aff6c6b
14 changed files with 482 additions and 186 deletions

View File

@@ -0,0 +1,20 @@
# include "cgi_utils.hpp"
int main (int ac, char **av, char ** env)
{
std::string http_header;
std::string http_body;
(void)ac;
(void)av;
fill_response_basic(env, http_body, http_header);
http_header += "Content-Length: " + itos(http_body.size() - 100);
std::cout << http_header << CRLF CRLF << http_body;
return 0;
}