This commit is contained in:
3lswear
2022-02-08 22:08:52 +03:00
parent 30921c41fd
commit 0c13c02344
4 changed files with 46 additions and 2 deletions

View File

@@ -236,6 +236,7 @@ void Response::generateBody(void)
bool Response::allowedMethod(std::string &method)
{
DBOUT << "allowedMethod called" << ENDL;
std::vector<std::string>::iterator it;
it = _location->methods.begin();
@@ -290,8 +291,11 @@ void Response::generate2(void)
_hostPort.ip = _config->getHost();
_hostPort.port = _config->getPort();
_fullURI = getFullURI();
DBOUT << "fullURI " << _fullURI << ENDL;
_method = _request.getMethod();
DBOUT << RED << "code is " << _code << ENDL;
if (_request.badCode(_code) || !allowedMethod(_method))
{
invalidClient();