Revert "wsd: add indirect request logo image"

This reverts commit bc7f16fa5d.

Change-Id: I36ca708e61dc6a2423ddd2b74881f43f4eb97fc9
Signed-off-by: Henry Castro <hcastro@collabora.com>
This commit is contained in:
Henry Castro 2022-06-22 11:32:46 -04:00 committed by Michael Meeks
parent 96061f910d
commit df1ce42fa3
2 changed files with 0 additions and 32 deletions

View file

@ -532,13 +532,6 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request,
return;
}
#endif
if (Util::startsWith(relPath, std::string("/browser/dist/remote/lokit-extra-img.svg")))
{
processLogo(socket);
return;
}
if (request.getMethod() == HTTPRequest::HTTP_POST && endPoint == "logging.html")
{
const std::string coolLogging = config.getString("browser_logging", "false");
@ -1225,29 +1218,6 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
LOG_TRC("Sent file: " << relPath << ": " << preprocess);
}
void FileServerRequestHandler::processLogo(const std::shared_ptr<StreamSocket>& socket)
{
if (!LogoData.empty())
{
std::ostringstream oss;
Poco::Net::HTTPResponse response;
response.add("X-XSS-Protection", "1; mode=block");
response.add("Referrer-Policy", "no-referrer");
response.add("X-Content-Type-Options", "nosniff");
response.set("Server", HTTP_SERVER_STRING);
response.set("Date", Util::getHttpTimeNow());
response.setContentType("image/svg+xml");
response.setChunkedTransferEncoding(false);
response.write(oss);
oss << LogoData;
socket->send(oss.str());
}
else
{
HttpHelper::sendError(404, socket, "", "");
}
}
void FileServerRequestHandler::preprocessWelcomeFile(const HTTPRequest& request,
const RequestDetails &/*requestDetails*/,

View file

@ -21,8 +21,6 @@ class FileServerRequestHandler
static std::string getRequestPathname(const Poco::Net::HTTPRequest& request);
static void processLogo(const std::shared_ptr<StreamSocket>& socket);
static void preprocessFile(const Poco::Net::HTTPRequest& request,
const RequestDetails &requestDetails,
Poco::MemoryInputStream& message,