Files
42_INT_12_webserv/srcs/cgi-bin/cgi_cpp_len.cpp
2022-08-17 18:21:55 +02:00

26 lines
495 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;
std::cin >> rq_body;
(void)ac;
(void)av;
http_header = "Content-Type: text/html; charset=UTF-8" CRLF;
http_header += "Content-Length: " + itos(http_body.size()) + CRLF;
fill_body_basic(env, http_body, rq_body);
std::cout << http_header << CRLF << http_body;
return 0;
}