dbms: fixed tiny issues [#CONV-2944].

This commit is contained in:
Alexey Milovidov 2012-11-19 04:16:00 +00:00
parent 7f2fe9f936
commit 64cf640e8a
2 changed files with 6 additions and 1 deletions

View File

@ -48,7 +48,12 @@ public:
~WriteBufferFromHTTPServerResponse()
{
if (!std::uncaught_exception())
{
if (!ostr)
ostr = &response.send();
next();
}
}
};

View File

@ -41,7 +41,7 @@ Poco::Net::HTTPRequestHandler * HTTPRequestHandlerFactory::createRequestHandler(
<< ", Address: " << request.clientAddress().toString()
<< ", User-Agent: " << (request.has("User-Agent") ? request.get("User-Agent") : "none"));
if (request.getURI().find('?') != std::string::npos)
if (request.getURI().find('?') != std::string::npos || request.getMethod() == Poco::Net::HTTPRequest::HTTP_POST)
return new HTTPHandler(server);
else if (request.getMethod() == Poco::Net::HTTPRequest::HTTP_GET)
return new PingRequestHandler();