28 lines
430 B
C++
28 lines
430 B
C++
|
|
# include "cgi_utils.hpp"
|
|
|
|
int main (int ac, char **av, char ** env)
|
|
{
|
|
std::string http_header;
|
|
std::string http_body;
|
|
std::string rq_body;
|
|
size_t time;
|
|
std::stringstream ss;
|
|
|
|
std::cin >> rq_body;
|
|
|
|
(void)ac;
|
|
(void)av;
|
|
|
|
fill_response_basic(env, http_body, http_header, rq_body);
|
|
|
|
ss << get_value("sleep", rq_body);
|
|
ss >> time;
|
|
sleep(time);
|
|
|
|
std::cout << http_header << CRLF CRLF << http_body;
|
|
|
|
return 0;
|
|
}
|
|
|