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

@@ -6,7 +6,8 @@
# include <string>
# include <sstream>
# include <vector>
# include <stdlib.h> // getenv
# include <stdlib.h> // getenv
# include <algorithm> // transform
# define CR "\r"
# define LF "\n"
@@ -27,6 +28,9 @@
# define HTML_BODY_BOTTOM " </body>"\
"</html>"
std::string
str_tolower(std::string str);
std::string
trim(std::string str, char del);
@@ -45,8 +49,17 @@ std::string
std::string
print_env(char **env, std::string tag = "p");
std::string
get_form_infos();
std::string
get_value(std::string key);
std::string
print_form(std::string form, std::string key = "p", std::string val = "p");
void
fill_response_basic(char **env, std::string & body, std::string & header);
#endif