Skip to content
Merged
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
75 changes: 75 additions & 0 deletions conf/diff_hosts.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
server {
listen 0.0.0.0:8080;
server_name mytest.local;
root ./;
autoindex on;
client_max_body_size 1m;
index assets/index.html;
use_chunked_encoding true;
chunk_size 100;

# Custom error pages
error_page 404 /error_page/404.html;
error_page 403 /error_page/403.html;
error_page 500 /error_page/500.html;

# Main site and directory listing test
location /assets/ {
root ./;
index old_index.html;
allowed_methods GET;
autoindex on;
}

location /cgi-bin/ {
root ./;
allowed_methods GET POST;
cgi_path /usr/bin/python3 /usr/bin/php;
cgi_ext .py .php;
autoindex off;
}

location /uploads/ {
root ./;
allowed_methods POST GET DELETE;
}

}

server {
listen 0.0.0.0:8081;
server_name mytest2.local;
root ./;
autoindex on;
client_max_body_size 1m;
index assets/index.html;
use_chunked_encoding true;
chunk_size 100;

# Custom error pages
error_page 404 /error_page/404.html;
error_page 403 /error_page/403.html;
error_page 500 /error_page/500.html;

# Main site and directory listing test
location /assets/ {
root ./;
index old_index.html;
allowed_methods GET;
autoindex on;
}

location /cgi-bin/ {
root ./;
allowed_methods GET POST;
cgi_path /usr/bin/python3 /usr/bin/php;
cgi_ext .py .php;
autoindex off;
}

location /uploads/ {
root ./;
allowed_methods POST GET DELETE;
}

}
15 changes: 0 additions & 15 deletions error_page/50x.html

This file was deleted.

1 change: 0 additions & 1 deletion src/Response/Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ std::string generateSessionID(std::size_t length = 32) {
return sessionID;
}


// add cookie to headers (headers are generated with the ones we have so changing headers in request effectively changes them in response too)
// not renaming but it also creates session
void Response::createSession( void ) {
Expand Down
1 change: 0 additions & 1 deletion src/Response/delete_Response.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "webserv.hpp"


void Response::HandleDeleteRequest(HttpRequest& ReqObj, PathInfo& pathInfo){
// Check if DELETE method is allowed
(void)ReqObj;
Expand Down