correction of trim in case of str only fill with delim char
+ added a new split, that also does trim, to split without counting newlines
This commit is contained in:
@@ -200,10 +200,12 @@ std::string Client::get_rq_headers(const std::string & key) const
|
||||
void Client::_parse_request_line()
|
||||
{
|
||||
std::vector<std::string> line;
|
||||
std::string raw_line;
|
||||
int ret;
|
||||
|
||||
ret = ::parse_http_first_line(raw_request, line);
|
||||
if (ret != 3)
|
||||
raw_line = extract_line();
|
||||
line = ::parse_http_first_line(raw_line);
|
||||
if (line.size() != 3)
|
||||
{
|
||||
std::cerr << "err _parse_first_line(): wrong number of elements (" << ret << " instead of 3)\n";
|
||||
status = 400; // "bad request"
|
||||
|
||||
Reference in New Issue
Block a user