mirror of
https://github.com/LibreOffice/online.git
synced 2025-07-29 12:01:08 +00:00
Remember to shutdown the socket after serving files.
re-factor to make it hard not to. Change-Id: I26ebc48b4660276ede64a22167ac4779cebf5cd4 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95440 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
This commit is contained in:
@ -1278,10 +1278,10 @@ enum class WSOpCode : unsigned char {
|
||||
|
||||
namespace HttpHelper
|
||||
{
|
||||
/// Sends file as HTTP response.
|
||||
void sendFile(const std::shared_ptr<StreamSocket>& socket, const std::string& path, const std::string& mediaType,
|
||||
Poco::Net::HTTPResponse& response, bool noCache = false, bool deflate = false,
|
||||
const bool headerOnly = false);
|
||||
/// Sends file as HTTP response and shutdown the socket.
|
||||
void sendFileAndShutdown(const std::shared_ptr<StreamSocket>& socket, const std::string& path, const std::string& mediaType,
|
||||
Poco::Net::HTTPResponse *optResponse = nullptr, bool noCache = false, bool deflate = false,
|
||||
const bool headerOnly = false);
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
Reference in New Issue
Block a user