wsd: fix assertion and better logging
In some cases the WOPISrc is inconsistently encoded. So now we decode before comparing. Also, improve related log entries. Change-Id: Ifd6cca76c91a34761dd0ce8f6d78c3af5d47fd43 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>pull/8402/head
parent
e54c9aeab0
commit
2d31aafa11
|
@ -34,6 +34,7 @@
|
|||
#include <ConfigUtil.hpp>
|
||||
#include <JailUtil.hpp>
|
||||
#include <ProofKey.hpp>
|
||||
#include <Util.hpp>
|
||||
|
||||
#include <Poco/File.h>
|
||||
#include <Poco/StreamCopier.h>
|
||||
|
@ -564,8 +565,9 @@ void ClientRequestDispatcher::handleIncomingMessage(SocketDisposition& dispositi
|
|||
accessDetails);
|
||||
if (accessDetails.isValid())
|
||||
{
|
||||
LOG_ASSERT_MSG(requestDetails.getField(RequestDetails::Field::WOPISrc) ==
|
||||
accessDetails.wopiSrc(),
|
||||
LOG_ASSERT_MSG(Util::decodeURIComponent(
|
||||
requestDetails.getField(RequestDetails::Field::WOPISrc)) ==
|
||||
Util::decodeURIComponent(accessDetails.wopiSrc()),
|
||||
"Expected identical WOPISrc in the request as in cool.html");
|
||||
|
||||
const std::string requestKey = RequestDetails::getRequestKey(
|
||||
|
|
|
@ -205,7 +205,7 @@ void RequestVettingStation::handleRequest(const std::string& id,
|
|||
LOG_TRC_S('#' << moveSocket->getFD()
|
||||
<< ": Dissociating client socket from "
|
||||
"ClientRequestDispatcher and invoking CheckFileInfo for ["
|
||||
<< docKey << ']');
|
||||
<< docKey << "], " << name(_cfiState));
|
||||
|
||||
// CheckFileInfo and only when it's good create DocBroker.
|
||||
if (_cfiState == CFIState::Active)
|
||||
|
@ -368,6 +368,10 @@ void RequestVettingStation::checkFileInfo(const std::string& url, const Poco::UR
|
|||
{
|
||||
_cfiState = CFIState::Active;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERR("Failed to start an async CheckFileInfo request");
|
||||
}
|
||||
}
|
||||
#endif //!MOBILEAPP
|
||||
|
||||
|
|
Loading…
Reference in New Issue