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:
20
srcs/cgi-bin/cgi_cpp_len_small.cpp
Normal file
20
srcs/cgi-bin/cgi_cpp_len_small.cpp
Normal 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user