wip, need somes changes in ConfigParser.
+ _determine_location() + http_method changes + http_method switch in _construct_response() + ConfigParser::_str_to_method_type() moved to global utils.cpp
This commit is contained in:
@@ -49,7 +49,7 @@ void Client::parse_request()
|
||||
|
||||
|
||||
|
||||
std::string &Client::get_method() { return _request.method; }
|
||||
http_method Client::get_method() { return _request.method; }
|
||||
std::string &Client::get_path() { return _request.path; }
|
||||
std::string &Client::get_version() { return _request.version; }
|
||||
std::string &Client::get_body() { return _request.body; }
|
||||
@@ -73,7 +73,7 @@ void Client::_parse_request_line( std::string rline )
|
||||
// method
|
||||
tmp = ::trim(sline[0], ' ');
|
||||
tmp = ::trim(tmp, '\r');
|
||||
_request.method = tmp;
|
||||
_request.method = str_to_http_method(tmp);
|
||||
// TODO uri in request_line
|
||||
// https://www.rfc-editor.org/rfc/rfc7230#section-5.3
|
||||
// https://stackoverflow.com/questions/40311306/when-is-absoluteuri-used-from-the-http-request-specs
|
||||
|
||||
Reference in New Issue
Block a user