fixed mistake in _read_request()
+ changes to some log output
This commit is contained in:
@@ -85,8 +85,7 @@ void Webserv::_construct_response(Client *client)
|
||||
|
||||
void Webserv::_process_method(Client *client, std::string &path)
|
||||
{
|
||||
std::cerr << "assigned_location->path = " << client->assigned_location->path << "\n"; // debug
|
||||
std::cerr << "allow_methods = " << client->assigned_location->allow_methods << "\n"; // debug
|
||||
std::cerr << "allow_methods = " << http_methods_to_str(client->assigned_location->allow_methods) << "\n"; // debug
|
||||
|
||||
switch (client->get_rq_method())
|
||||
{
|
||||
@@ -182,8 +181,6 @@ ServerConfig *_determine_process_server(Client *client, std::vector<ServerConfig
|
||||
// Temporary Global Scope. Probably move to Client in the future.
|
||||
const LocationConfig *_determine_location(const ServerConfig &server, const std::string &path)
|
||||
{
|
||||
std::cout << "determin location path sent: " << path << '\n';
|
||||
|
||||
/* RULES ***
|
||||
|
||||
If a path coresponds exactly to a location, use that one
|
||||
@@ -205,13 +202,8 @@ If we get a url that ends in / ignore the last /
|
||||
|
||||
for (std::vector<LocationConfig>::const_iterator it = server.locations.begin(); it != server.locations.end(); it++)
|
||||
{
|
||||
std::cout << it->path << " -- ";
|
||||
|
||||
if (it->path.size() > uri.size())
|
||||
{
|
||||
std::cout << "skipping this one\n";
|
||||
continue ;
|
||||
}
|
||||
|
||||
if (uri.compare(0, it->path.size(), it->path) == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user