Skip to content
Open

init #166

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/conf.d
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ server {
listen 4242;
body_size 10000000;
max_connect 100;
max_header 4000;
root storage/static2/;
default_file index.html;
upload_path storage/temp/var2;
Expand Down
3 changes: 2 additions & 1 deletion src/Request/RequestHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@ int RequestHandler(struct kevent* curr_event) {
client_type->GetParentServer().GetServerConfig().main_config_[MAXH]);
int max_body_size = StringToLong(
client_type->GetParentServer().GetServerConfig().main_config_[BODY]);
char buf[max_header_size + 1];
// char buf[max_header_size + 1];
static char* buf = new char[max_header_size + 1];
std::memset(buf, -1, max_header_size + 1);

switch (client_type->GetStage()) {
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ int main(int ac, char** av, char** en) {
SOUT << "Usage : ./webserv {config path}" << SEND;
return (-1);
}

signal(SIGPIPE, SIG_IGN);
ServerConfig webserv(av[1]);

webserv.PrintServerConfig();
Expand Down
Loading