+ MethodType renamed to http_method, and moved to utils.hpp + operator= overload for Client moved to Client.cpp
57 lines
1.6 KiB
C++
57 lines
1.6 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* LocationConfig.hpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/07/23 16:08:00 by me #+# #+# */
|
|
/* Updated: 2022/08/02 14:06:07 by lperrey ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef LOCATIONCONFIG_HPP
|
|
# define LOCATIONCONFIG_HPP
|
|
|
|
# include <map>
|
|
# include <vector>
|
|
# include <string>
|
|
|
|
|
|
// again, struct instead?
|
|
class LocationConfig
|
|
{
|
|
public:
|
|
// canonic stuff?
|
|
|
|
std::string path;
|
|
|
|
int client_body_limit;
|
|
std::string root;
|
|
std::vector<std::string> index;
|
|
std::vector<http_method> allow_methods;
|
|
std::map<std::string, std::string> cgi_info;
|
|
|
|
// wait if i can call several times, shouldn't it be a map?
|
|
// wait no there can only be 1 and i think it might have to be in
|
|
// location only...
|
|
int redirect_status;
|
|
std::string redirect_uri;
|
|
// au pire you do location / { return 301 http://location; }
|
|
// and that's how you get the redirect from the root.
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|