Always process responses inside RootResource

The REST API would skip propagation of the requests to the RootResource if
it was a request to the empty resource.
This commit is contained in:
Markus Mäkelä
2018-11-08 06:55:09 +02:00
parent 7d54df74dc
commit d65269fabb
2 changed files with 6 additions and 8 deletions

View File

@ -86,8 +86,11 @@ bool HttpRequest::validate_api_version()
{
bool rval = false;
if (m_resource_parts.size() > 0
&& m_resource_parts[0] == MXS_REST_API_VERSION)
if (m_resource_parts.empty())
{
rval = true;
}
else if (m_resource_parts[0] == MXS_REST_API_VERSION)
{
m_resource_parts.pop_front();
rval = true;