Fix filtering by name

fixes #10027
This commit is contained in:
Gunnar Beutner 2015-08-28 10:52:59 +02:00
parent d7a21c2361
commit 9d9a7ca73d
2 changed files with 3 additions and 2 deletions

View File

@ -105,7 +105,7 @@ std::vector<Value> FilterUtility::GetFilterTargets(const QueryDescription& qd, c
attr = "name"; attr = "name";
if (query->Contains(attr)) if (query->Contains(attr))
result.push_back(provider->GetTargetByName(type, query->Get(attr))); result.push_back(provider->GetTargetByName(type, HttpUtility::GetLastParameter(query, attr)));
attr = provider->GetPluralName(type); attr = provider->GetPluralName(type);
boost::algorithm::to_lower(attr); boost::algorithm::to_lower(attr);

View File

@ -87,7 +87,6 @@ void HttpResponse::WriteBody(const char *data, size_t count)
void HttpResponse::Finish(void) void HttpResponse::Finish(void)
{ {
ASSERT(m_State != HttpResponseEnd); ASSERT(m_State != HttpResponseEnd);
m_State = HttpResponseEnd;
if (m_Request.ProtocolVersion == HttpVersion10) { if (m_Request.ProtocolVersion == HttpVersion10) {
if (m_Body) if (m_Body)
@ -105,6 +104,8 @@ void HttpResponse::Finish(void)
m_Stream->Write("\r\n", 2); m_Stream->Write("\r\n", 2);
} }
m_State = HttpResponseEnd;
if (m_Request.ProtocolVersion == HttpVersion10 || m_Request.Headers->Get("connection") == "close") if (m_Request.ProtocolVersion == HttpVersion10 || m_Request.Headers->Get("connection") == "close")
m_Stream->Shutdown(); m_Stream->Shutdown();
} }