Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugothms committed Jan 31, 2022
1 parent 8fb9977 commit 3bf7e06
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions srcs/request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: hthomas <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/15 17:21:43 by hthomas #+# #+# */
/* Updated: 2022/01/21 17:46:00 by hthomas ### ########.fr */
/* Updated: 2022/01/31 16:25:31 by hthomas ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -290,8 +290,8 @@ char **Request::build_cgi_env(string &extention_name)

if (type == "GET")
{
ev.push_back("QUERY_STRING="+ filepath.substr(filepath.find_first_of('?') + 1));
ev.push_back("CONTENT_LENGTH=0");//+ to_string(headers["Body"].length()) );
ev.push_back("QUERY_STRING=" + filepath.substr(filepath.find_first_of('?') + 1));
ev.push_back("CONTENT_LENGTH=0");
extention_name = extention_name.substr(0, extention_name.find_first_of('?'));
}
else if (type == "POST")
Expand All @@ -301,7 +301,7 @@ char **Request::build_cgi_env(string &extention_name)
if (code == 413)
ev.push_back("CONTENT_LENGTH=0");
else
ev.push_back("CONTENT_LENGTH="+ to_string_custom(headers["Body"].length()));//(data_buff->length()) );
ev.push_back("CONTENT_LENGTH=" + to_string_custom(headers["Body"].length()));//(data_buff->length()) );
}

char **_ev = static_cast<char**>(malloc(sizeof(char *) * (ev.size() + 1)));
Expand Down

0 comments on commit 3bf7e06

Please sign in to comment.