diff --git a/Makefile b/Makefile index 5ea3244..590c0d2 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ CXXFLAGS = -Wall -Wextra #-Werror CXXFLAGS += $(HEADERS_D:%=-I%) CXXFLAGS += -std=c++98 CXXFLAGS += -g -CXXFLAGS += -fno-limit-debug-info +#CXXFLAGS += -fno-limit-debug-info CXXFLAGS += -MMD -MP #header dependencie #CXXFLAGS += -O3 @@ -18,7 +18,7 @@ HEADERS_D = srcs \ SRCS_D = srcs \ srcs/webserv \ - srcs/config + srcs/config \ SRCS = main.cpp \ base.cpp init.cpp close.cpp epoll_update.cpp signal.cpp \ @@ -36,9 +36,12 @@ OBJS_D = builds OBJS = $(SRCS:%.cpp=$(OBJS_D)/%.o) DEPS = $(OBJS:.o=.d) #header dependencie -# -------------------- -# ------ RULES ------- -# -------------------- +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # +# . target: prerequisites . $@ : target # +# RULES . recipe . $< : 1st prerequisite # +# . @recipe (silent) . $^ : all prerequisites # +# . target: VAR = assignment . | : order-only prereq. # +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # all: $(NAME) @@ -53,6 +56,16 @@ $(NAME): $(OBJS) $(CXX) $^ -o $(NAME) echo "$(_GREEN)\r\33[2K\r$(NAME) created 😎$(_END)" +# CGI +cgi: + make -C srcs/cgi-bin +cgiclean: + make clean -C srcs/cgi-bin +cgifclean: + make fclean -C srcs/cgi-bin +cgire: + make re -C srcs/cgi-bin + clean: rm -rf $(OBJS_D) echo "$(_RED).o Files Deleted 😱$(_END)" diff --git a/default_error_pages/404.html b/default_error_pages/404.html deleted file mode 100644 index df4d27c..0000000 --- a/default_error_pages/404.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - 404 Not Found - - -

404 Not Found

-
-

Le Webserv/0.1

- - \ No newline at end of file diff --git a/memo.txt b/memo.txt index 7ded14e..6987b8b 100644 --- a/memo.txt +++ b/memo.txt @@ -1,19 +1,22 @@ -IN 42 SUBJECT AND/OR PRIORITY : +----Priorité élevée------------------------ - CGI (TODO HUGO) - Need to test normal body parsing (Verif avec HUGO) -- Ecrire des tests ! -- handle redirection (Work, but weird behavior need deeper test) - - curl --resolve, for testing hostname curl -v --resolve server1:4040:127.0.0.1 --resolve server2:4040:127.0.0.1 server1:4040 - test limit de connexions sur listen() ------------------------------ -Si ce n'est pas deja fait : -peut-être check si ip > 32bits ------------------------------ +- handle redirection (Work, but weird behavior need deeper test) +- Ecrire des tests ! + +----Priorité modérée------------------------ +- namespace utils ? +- change "std::string" to reference "std::string &" in most functions +and add "const" if apropriate. +- peut-être check si ip > 32bits + +----Priorité faible------------------------ - chunked request (need testing) - client_body_limit 0 valeur special pour desactiver dans config - gerer le champ "Accept" du client @@ -26,11 +29,3 @@ peut-être check si ip > 32bits - change "std::string" to reference "std::string &" in most functions and add "const" if apropriate. - Il faut vérifier le path de la requête, voir si le serveur est bien censé délivrer cette ressource et si le client y a accès, avant d'appeler le CGI. - - -__________________________ --------------------------- - -----Discord 42------------ -Un truc cool et surtout bien utile ici c'est d'utiliser un proxy entre ton navigateur et ton serveur pour vérifier ce qui est envoyé en raw. Les navigateurs peuvent avoir des comportements différents. -Vous avez des modules sur vos navigateur ou des logiciels externe. C'est assez rapide et gratuit. \ No newline at end of file diff --git a/srcs/cgi-bin/Makefile b/srcs/cgi-bin/Makefile new file mode 100644 index 0000000..5f521ed --- /dev/null +++ b/srcs/cgi-bin/Makefile @@ -0,0 +1,86 @@ +# - - - - - - # +# # +# COLORS # +# # +# - - - - - - # + +GRAY = "\e[0;30m" +RED = "\e[0;31m" +GREEN = "\e[0;32m" +YELLOW = "\e[0;33m" +BLUE = "\e[0;34m" +PURPLE = "\e[0;35m" +CYAN = "\e[0;36m" +WHITE = "\e[0;37m" + +B_GRAY = "\e[1;30m" +B_RED = "\e[1;31m" +B_GREEN = "\e[1;32m" +B_YELLOW = "\e[1;33m" +B_BLUE = "\e[1;34m" +B_PURPLE = "\e[1;35m" +B_CYAN = "\e[1;36m" +B_WHITE = "\e[1;37m" + +RESET = "\e[0m" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # +# . name = value \ . += append to a variable # +# VARIABLES . value . != set result of command # +# . name is case sensitive . ?= set if not already set # +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # + +NAME_1 = $(SRCS_1:.cpp=.out) +NAME_2 = $(SRCS_2:.cpp=.out) + +CXX = c++ +CXXFLAGS = -Wall -Wextra #-Werror +CXXFLAGS += $(HEADERS_D:%=-I%) +CXXFLAGS += -std=c++98 +CXXFLAGS += -g + +VPATH = $(SRCS_D) +HEADERS_D = . +SRCS_D = . + +SRCS = cgi_utils.cpp +SRCS_1 = cgi_cpp.cpp +SRCS_2 = cgi_cpp_content_length.cpp + +OBJS_D = builds +OBJS = $(SRCS:%.cpp=$(OBJS_D)/%.o) +OBJS_1 = $(SRCS_1:%.cpp=$(OBJS_D)/%.o) +OBJS_2 = $(SRCS_2:%.cpp=$(OBJS_D)/%.o) + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # +# . target: prerequisites . $@ : target # +# RULES . recipe . $< : 1st prerequisite # +# . recipe . $^ : all prerequisites # +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # + +all: cgi_1 cgi_2 +cgi_1: $(NAME_1) +cgi_2: $(NAME_2) + +$(OBJS_D)/%.o: %.cpp | $(OBJS_D) + $(CXX) $(CXXFLAGS) -c $< -o $@ + +$(OBJS_D): + mkdir $@ + +$(NAME_1): $(OBJS) $(OBJS_1) +$(NAME_2): $(OBJS) $(OBJS_2) +$(NAME_1) $(NAME_2): + $(CXX) $^ -o $@ + +clean: + rm -rf $(OBJS_D) + +fclean: clean + rm -f $(NAME_1) + rm -f $(NAME_2) + +re: fclean all + +.PHONY : all clean fclean re + diff --git a/srcs/cgi-bin/cgi b/srcs/cgi-bin/cgi new file mode 100755 index 0000000..14e0d29 --- /dev/null +++ b/srcs/cgi-bin/cgi @@ -0,0 +1,4 @@ +#! /bin/bash +echo "status: 100\r\n" +echo "\r\n\r\n" +echo "hiii" diff --git a/srcs/cgi-bin/cgi_cpp.cpp b/srcs/cgi-bin/cgi_cpp.cpp index 8cabc71..10c475a 100644 --- a/srcs/cgi-bin/cgi_cpp.cpp +++ b/srcs/cgi-bin/cgi_cpp.cpp @@ -1,114 +1,51 @@ -# include -# include -# include -# include -# include // getenv -# define CR "\r" -# define LF "\n" -# define CRLF CR LF -# define NPOS std::string::npos +# include "cgi_utils.hpp" -std::string trim(std::string str, char del) +int main (int ac, char **av, char ** env) { - size_t pos; + std::string rq_method = "not found"; + std::string rq_body = ""; + std::string rq_query = ""; + std::string form_infos = ""; + std::string http_header = ""; + std::string http_body = ""; - // delete leadings del - pos = str.find_first_not_of(del); - if (pos == NPOS) - pos = str.size(); - str = str.substr(pos); + (void)ac; + (void)av; - // delete trailing del - pos = str.find_last_not_of(del); - if (pos != NPOS) - str = str.substr(0, pos + 1); + rq_method = parse_env("REQUEST_METHOD"); + rq_body = parse_body(); + rq_query = parse_env("QUERY_STRING"); - return str; -} + if (rq_method == "POST") + form_infos = rq_body; + else if (rq_method == "GET") + form_infos = rq_query; -std::vector - split(const std::string & input, std::string delim, char ctrim = '\0') -{ - std::vector split_str; - std::string tmp; - size_t start = 0; - size_t end = 0; - size_t len = 0; + http_body = HTML_BODY_TOP; - while (end != NPOS) - { - end = input.find(delim, start); - len = end - start; - if (end == NPOS) - len = end; - tmp = input.substr(start, len); - if (ctrim != '\0') - tmp = trim(tmp, ctrim); - if (tmp.size() != 0) - split_str.push_back( tmp ); - start = end + delim.size(); - } - return split_str; -} + http_body += "

method used:

"; + http_body += "

" + rq_method + "

"; -int main (int ac, char **av, char **en) -{ - std::vector split_str; - std::vector sub_split_str; - std::vector::const_iterator it; - char * tmp; - std::string input; - std::string http_header; - std::string http_body; - std::ostringstream strs; - size_t pos; + http_body += "

form body:

"; + http_body += "

" + rq_body + "

"; - std::cin >> input; + http_body += "

form query:

"; + http_body += "

" + rq_query + "

"; - http_header = "Content-Type: text/html; charset=UTF-8" CRLF; - http_header += "Content-Length: "; + http_body += "

output:


"; + http_body += print_form(form_infos, "p", "p"); - http_body = "\ - \ - \ - \ - CGI\ - \ - \ -

cgi

\ - "; + http_body += "

cgi_env_variables:


"; + http_body += print_env(env, "p"); - http_body += "

"; - tmp = getenv("REQUEST_METHOD"); - if (tmp != NULL) - http_body += tmp; - else - http_body = "method not foud"; - http_body += "

"; + http_body += HTML_BODY_BOTTOM; - split_str = split(input, "&"); - for (it = split_str.begin(); it != split_str.end(); ++it) - { - sub_split_str = split(*it, "="); - http_body += "

"; - http_body += sub_split_str[0]; - http_body += "

"; - http_body += "

"; - http_body += sub_split_str[1]; - http_body += "

"; - } - - http_body += "\ - \ - \ - "; - - strs << http_body.size(); - http_header += strs.str(); - http_header += CRLF CRLF; + http_header = "Content-Type: text/html; charset=UTF-8" CRLF; + http_header += "Content-Length: " + itos(http_body.size() - 10); std::cout << http_header << CRLF CRLF << http_body; + return 0; } diff --git a/srcs/cgi-bin/cgi_cpp_content_length.cpp b/srcs/cgi-bin/cgi_cpp_content_length.cpp index 9bb5089..c23cb50 100644 --- a/srcs/cgi-bin/cgi_cpp_content_length.cpp +++ b/srcs/cgi-bin/cgi_cpp_content_length.cpp @@ -1,65 +1,14 @@ -# include -# include -# include -# include -# include // getenv -# define CR "\r" -# define LF "\n" -# define CRLF CR LF -# define NPOS std::string::npos +# include "cgi_utils.hpp" -std::string trim(std::string str, char del) +int main () { - size_t pos; - - // delete leadings del - pos = str.find_first_not_of(del); - if (pos == NPOS) - pos = str.size(); - str = str.substr(pos); - - // delete trailing del - pos = str.find_last_not_of(del); - if (pos != NPOS) - str = str.substr(0, pos + 1); - - return str; -} - -std::vector - split(const std::string & input, std::string delim, char ctrim = '\0') -{ - std::vector split_str; - std::string tmp; - size_t start = 0; - size_t end = 0; - size_t len = 0; - - while (end != NPOS) - { - end = input.find(delim, start); - len = end - start; - if (end == NPOS) - len = end; - tmp = input.substr(start, len); - if (ctrim != '\0') - tmp = trim(tmp, ctrim); - if (tmp.size() != 0) - split_str.push_back( tmp ); - start = end + delim.size(); - } - return split_str; -} - -int main (int ac, char **av, char **en) { std::vector split_str; std::vector sub_split_str; std::vector::const_iterator it; char * tmp; std::string output; std::ostringstream strs; - size_t pos; std::cout << "Content-Type: text/html; charset=UTF-8" << CRLF CRLF; diff --git a/srcs/cgi-bin/cgi_style.css b/srcs/cgi-bin/cgi_style.css new file mode 100644 index 0000000..52c981f --- /dev/null +++ b/srcs/cgi-bin/cgi_style.css @@ -0,0 +1,3 @@ +h1, h2, h3, p { + display: inline; +} diff --git a/srcs/cgi-bin/cgi_utils.cpp b/srcs/cgi-bin/cgi_utils.cpp new file mode 100644 index 0000000..cea2ca9 --- /dev/null +++ b/srcs/cgi-bin/cgi_utils.cpp @@ -0,0 +1,104 @@ +#include "cgi_utils.hpp" + +std::string trim(std::string str, char del) +{ + size_t pos; + + // delete leadings del + pos = str.find_first_not_of(del); + if (pos == NPOS) + pos = str.size(); + str = str.substr(pos); + + // delete trailing del + pos = str.find_last_not_of(del); + if (pos != NPOS) + str = str.substr(0, pos + 1); + + return str; +} + +std::vector + split(const std::string & input, std::string delim, char ctrim) +{ + std::vector split_str; + std::string tmp; + size_t start = 0; + size_t end = 0; + size_t len = 0; + + while (end != NPOS) + { + end = input.find(delim, start); + len = end - start; + if (end == NPOS) + len = end; + tmp = input.substr(start, len); + if (ctrim != '\0') + tmp = trim(tmp, ctrim); + if (tmp.size() != 0) + split_str.push_back( tmp ); + start = end + delim.size(); + } + return split_str; +} + +std::string itos(int n) +{ + std::stringstream strs; + + strs << n; + return ( strs.str() ); +} + +std::string parse_env(const std::string & env) +{ + std::string ret = ""; + char * ret_env; + + ret_env = getenv(env.c_str()); + if (ret_env != NULL) + ret = ret_env; + + return ret; +} + +std::string parse_body() +{ + std::string ret; + + std::cin >> ret; + return ret; +} + +std::string print_env(char **env, std::string tag) +{ + std::string ret = ""; + + for (int i = 0; env[i] != NULL; ++i) + { + ret += "<" + tag + ">"; + ret += env[i]; + ret += "
"; + } + return ret; +} + +std::string + print_form(std::string form, std::string tag_key, std::string tag_val) +{ + std::vector split_str; + std::vector sub_split_str; + std::vector::const_iterator it; + std::string ret = ""; + + split_str = split(form, "&"); + for (it = split_str.begin(); it != split_str.end(); ++it) + { + sub_split_str = split(*it, "="); + ret += "
<" + tag_key + ">" + sub_split_str[0] + ": "; + ret += "<" + tag_val + ">" + sub_split_str[1] + ""; + } + return ret; +} + diff --git a/srcs/cgi-bin/cgi_utils.hpp b/srcs/cgi-bin/cgi_utils.hpp new file mode 100644 index 0000000..00abe7b --- /dev/null +++ b/srcs/cgi-bin/cgi_utils.hpp @@ -0,0 +1,52 @@ + +#ifndef CGI_UTILS_HPP +# define CGI_UTILS_HPP + +# include +# include +# include +# include +# include // getenv + +# define CR "\r" +# define LF "\n" +# define CRLF CR LF +# define CRLF_SIZE 2 +# define NPOS std::string::npos + +# define HTML_BODY_TOP ""\ + ""\ + " "\ + " "\ + " "\ + " CGI"\ + " "\ + " "\ + " "\ + "

cgi


" +# define HTML_BODY_BOTTOM " "\ + "" + +std::string + trim(std::string str, char del); + +std::vector + split(const std::string & input, std::string delim, char ctrim = '\0'); + +std::string + itos(int n); + +std::string + parse_env(const std::string & env); + +std::string + parse_body(); + +std::string + print_env(char **env, std::string tag = "p"); + +std::string + print_form(std::string form, std::string key = "p", std::string val = "p"); + +#endif + diff --git a/srcs/utils.cpp b/srcs/utils.cpp index d85d5d5..4c82845 100644 --- a/srcs/utils.cpp +++ b/srcs/utils.cpp @@ -153,10 +153,9 @@ std::string http_methods_to_str(unsigned int methods) file_type eval_file_type(const std::string &path) { - const char *tmp_path = path.c_str(); // variable superflu ? struct stat s; - if (stat(tmp_path, &s) != -1) + if (stat(path.c_str(), &s) != -1) { if (S_ISREG(s.st_mode)) return (IS_FILE); @@ -171,8 +170,7 @@ file_type eval_file_type(const std::string &path) return (IS_OTHER); } -// rename in "eval_file_access" ? -size_t eval_file_mode(const std::string &path, int mode) +size_t eval_file_access(const std::string &path, int mode) { if (::access(path.c_str(), F_OK) == -1) { diff --git a/srcs/utils.hpp b/srcs/utils.hpp index 44f5347..7d00e1b 100644 --- a/srcs/utils.hpp +++ b/srcs/utils.hpp @@ -67,7 +67,7 @@ std::string trim(std::string str, char del); http_method str_to_http_method(std::string &str); std::string http_methods_to_str(unsigned int methods); file_type eval_file_type(const std::string &path); -size_t eval_file_mode(const std::string &path, int mode); +size_t eval_file_access(const std::string &path, int mode); void replace_all_substr(std::string &str, const std::string &ori_substr, const std::string &new_substr); std::string str_tolower(std::string str); std::string extract_line(std::string & str, size_t pos = 0, std::string delim = "\n"); diff --git a/srcs/webserv/cgi_script.cpp b/srcs/webserv/cgi_script.cpp index e572749..815218e 100644 --- a/srcs/webserv/cgi_script.cpp +++ b/srcs/webserv/cgi_script.cpp @@ -20,7 +20,7 @@ bool Webserv::_is_cgi(Client *client, std::string path) continue; if (file_type == IS_FILE) { - file_mode = ::eval_file_mode( script_path, X_OK ); + file_mode = ::eval_file_access( script_path, X_OK ); if (!file_mode) return true; } @@ -187,9 +187,13 @@ std::string Webserv::_exec_script(Client *client, char **env) void Webserv::_check_script_output(Client *client, std::string & output) { _check_script_status(client, output); +///*DEBUG*/ std::cout << "\n" B_PURPLE "[script status]:" RESET "\n"; ::print_special(output); std::cout << B_PURPLE "-----------" RESET "\n\n"; _check_script_fields(client, output); +///*DEBUG*/ std::cout << "\n" B_PURPLE "[script fields]:" RESET "\n"; ::print_special(output); std::cout << B_PURPLE "-----------" RESET "\n\n"; _remove_body_leading_empty_lines(output); +///*DEBUG*/ std::cout << "\n" B_PURPLE "[script empty lines]:" RESET "\n"; ::print_special(output); std::cout << B_PURPLE "-----------" RESET "\n\n"; _add_script_body_length_header(output); +///*DEBUG*/ std::cout << "\n" B_PURPLE "[script content length]:" RESET "\n"; ::print_special(output); std::cout << B_PURPLE "-----------" RESET "\n\n"; // _check_script_empty_lines(client, output); // _check_script_space_colons(client, output); // _check_script_new_lines(client, output); diff --git a/srcs/webserv/method_delete.cpp b/srcs/webserv/method_delete.cpp index 16c7d94..248471e 100644 --- a/srcs/webserv/method_delete.cpp +++ b/srcs/webserv/method_delete.cpp @@ -12,7 +12,7 @@ void Webserv::_delete(Client *client, const std::string &path) void Webserv::_delete_file(Client *client, const std::string &path) { std::cout << "_delete_file()\n"; - client->status = ::eval_file_mode(path, W_OK); + client->status = ::eval_file_access(path, W_OK); if (client->status) return; diff --git a/srcs/webserv/method_get.cpp b/srcs/webserv/method_get.cpp index bad7ad5..77d5add 100644 --- a/srcs/webserv/method_get.cpp +++ b/srcs/webserv/method_get.cpp @@ -55,7 +55,7 @@ void Webserv::_get_file(Client *client, const std::string &path) std::cout << "_get_file()\n"; - client->status = ::eval_file_mode(path, R_OK); + client->status = ::eval_file_access(path, R_OK); if (client->status) return; diff --git a/srcs/webserv/method_post.cpp b/srcs/webserv/method_post.cpp index ce7309b..8611770 100644 --- a/srcs/webserv/method_post.cpp +++ b/srcs/webserv/method_post.cpp @@ -38,7 +38,7 @@ void Webserv::_upload_files(Client *client) size_t pos; bool file_existed = false; - client->status = ::eval_file_mode(client->assigned_location->upload_dir, W_OK); + client->status = ::eval_file_access(client->assigned_location->upload_dir, W_OK); if (client->status) return; diff --git a/srcs/webserv/response.cpp b/srcs/webserv/response.cpp index 3de4469..627a868 100644 --- a/srcs/webserv/response.cpp +++ b/srcs/webserv/response.cpp @@ -47,7 +47,7 @@ int Webserv::_send_response(Client *client) if (client->status >= 400) _error_html_response(client); -/*DEBUG*/ std::cout << "\n" B_PURPLE "[response + output + headers]:" RESET "\n"; ::print_special(client->response); std::cout << "\n" B_PURPLE "-----------" RESET "\n\n"; +// /*DEBUG*/ std::cout << "\n" B_PURPLE "[response + output + headers]:" RESET "\n"; ::print_special(client->response); std::cout << "\n" B_PURPLE "-----------" RESET "\n\n"; std::cerr << "client->response.size() = " << client->response.size() << "\n"; // DEBUG ret = ::send(client->get_cl_fd(), client->response.c_str(), client->response.size(), 0); @@ -90,14 +90,11 @@ void Webserv::_construct_response(Client *client) if (_is_cgi(client, path)) { script_output = _exec_cgi(client); - -///*DEBUG*/ std::cout << "\n" B_PURPLE "[script output]:" RESET "\n"; ::print_special(script_output); std::cout << B_PURPLE "-----------" RESET "\n\n"; ///*DEBUG*/ std::cout << "\n" B_PURPLE "[response]:" RESET "\n"; ::print_special(client->response); std::cout << B_PURPLE "-----------" RESET "\n\n"; - +///*DEBUG*/ std::cout << "\n" B_PURPLE "[script output]:" RESET "\n"; ::print_special(script_output); std::cout << B_PURPLE "-----------" RESET "\n\n"; _check_script_output(client, script_output); client->response += script_output; - -/*DEBUG*/ std::cout << B_YELLOW "inside cgi" RESET "\n"; +///*DEBUG*/ std::cout << B_YELLOW "inside cgi" RESET "\n"; ///*DEBUG*/ std::cout << "\n" B_PURPLE "[response + output]:" RESET "\n"; ::print_special(client->response); std::cout << B_PURPLE "-----------" RESET "\n\n"; return; @@ -134,14 +131,20 @@ void Webserv::_insert_status_line(Client *client) void Webserv::_error_html_response(Client *client) { - if (!client->assigned_server || client->assigned_server->error_pages[client->status].empty()) + std::cout << "_error_html_response()\n"; + + if (client->assigned_server + && !client->assigned_server->error_pages[client->status].empty() + && ::eval_file_access(client->assigned_server->error_pages[client->status], R_OK) == 0 ) + { + _get_file(client, client->assigned_server->error_pages[client->status]); + } + else { std::string html_page = HTML_ERROR; ::replace_all_substr(html_page, STATUS_PLACEHOLDER, _http_status[client->status]); _append_body(client, html_page, "html"); } - else - _get_file(client, client->assigned_server->error_pages[client->status]); } void Webserv::_append_body(Client *client, const std::string &body, const std::string &file_extension) diff --git a/www/error_pages/error_404.html b/www/error_pages/error_404.html index fa18a2b..114a656 100644 --- a/www/error_pages/error_404.html +++ b/www/error_pages/error_404.html @@ -4,8 +4,8 @@ 404 Not Found -

Check it UP 404 Not Found

+

Custom 404 Not Found


-

Le Webserv/0.1

+

(° ͜ʖ °) Grosse personnalisation

diff --git a/www/form_get.html b/www/form_cgi.html similarity index 100% rename from www/form_get.html rename to www/form_cgi.html