epee: trap failure to parse URI from request

This commit is contained in:
moneromooo-monero 2017-12-10 15:06:23 +00:00
parent 061789b5dd
commit 187a6ab2d2
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -345,7 +345,12 @@ namespace net_utils
{ {
analize_http_method(result, m_query_info.m_http_method, m_query_info.m_http_ver_hi, m_query_info.m_http_ver_hi); analize_http_method(result, m_query_info.m_http_method, m_query_info.m_http_ver_hi, m_query_info.m_http_ver_hi);
m_query_info.m_URI = result[10]; m_query_info.m_URI = result[10];
parse_uri(m_query_info.m_URI, m_query_info.m_uri_content); if (!parse_uri(m_query_info.m_URI, m_query_info.m_uri_content))
{
m_state = http_state_error;
MERROR("Failed to parse URI: m_query_info.m_URI");
return false;
}
m_query_info.m_http_method_str = result[2]; m_query_info.m_http_method_str = result[2];
m_query_info.m_full_request_str = result[0]; m_query_info.m_full_request_str = result[0];