Something went wrong. Try again.
An HTTP server written in C++98 projects.intra.42.fr/projects/webserv
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283/* ************************************************************************** *//* *//* ::: :::::::: *//* Location.cpp :+: :+: :+: *//* +:+ +:+ +:+ *//* By: bcausseq <bcausseq@42angouleme.fr> +#+ +:+ +#+ *//* +#+#+#+#+#+ +#+ *//* Created: 2026/09/25 09:10:40 by bcausseq #+# #+# *//* Updated: 2026/09/25 10:04:23 by bcausseq ### ########.fr *//* *//* ************************************************************************** */
#include "Location.hpp"
voidLocation::set_root(std::string& root){ _root = root;}
voidLocation::set_redir(bool redir, unsigned short redir_code, std::string redir_path){ _redir = redir; _redir_code = redir_code; _redir_path = redir_path;}
voidLocation::set_cgi(std::string& cgi, std::string& pass){ _cgi_path[cgi] = pass;}
std::vector<std::string>&Location::get_index(){ return (_index);}
voidLocation::set_path(std::string& path){ _path = path;}
std::vector<std::string>&Location::get_methods(){ return (_methods);}
const std::vector<std::string>&Location::get_methods() const{ return (_methods);}
voidLocation::set_autoindex(bool autoindex){ _auto_index = autoindex;}
voidLocation::set_cookie(bool cookie){ _cookies = cookie;}
const std::string&Location::get_path() const{ return (_path);}
const std::string&Location::get_root() const{ return (_root);}