merge hugo5 with script cgi tests

This commit is contained in:
Hugo LAMY
2022-08-17 18:26:06 +02:00
26 changed files with 628 additions and 133 deletions

View File

@@ -5,25 +5,20 @@
int main (int ac, char **av, char ** env)
{
std::string http_header;
std::string http_body;
std::string http_header;
std::string http_body;
std::string rq_body;
std::cin >> rq_body;
(void)ac;
(void)av;
// ::sleep(5);
http_header = "Content-Type: text/html; charset=UTF-8" CRLF;
fill_response_basic(env, http_body, http_header);
fill_body_basic(env, http_body, rq_body);
std::cout << http_header;
std::flush(std::cout);
::sleep(2);
std::cout << CRLF CRLF;
std::flush(std::cout);
::sleep(2);
std::cout << http_body;
std::flush(std::cout);
::sleep(2);
std::cout << http_header << CRLF << http_body;
return 0;
}