summaryrefslogtreecommitdiff
path: root/wsd/Storage.hpp
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2020-06-14 12:44:10 -0400
committerAshod Nakashian <ashnakash@gmail.com>2020-06-20 16:33:20 +0200
commit2c73b622d75ee6fa62b7d74e1548cda877201af8 (patch)
tree2c5e0dad3a1f41db3e1b7b193ffaec4020ba2898 /wsd/Storage.hpp
parent008d4ea32f475a669668394f6b886d255a586090 (diff)
wsd: extract WOPI HTTP request construction
This hoists the common parts of the HTTPRequest for all WOPI requests to avoid errors when changing them. Change-Id: Ia02ef657a43b7a7d2fc13be3da012836fa0d7650 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96372 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'wsd/Storage.hpp')
-rw-r--r--wsd/Storage.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/wsd/Storage.hpp b/wsd/Storage.hpp
index b426d44bd..d7f6d70f9 100644
--- a/wsd/Storage.hpp
+++ b/wsd/Storage.hpp
@@ -505,6 +505,12 @@ public:
std::chrono::duration<double> getWopiSaveDuration() const { return _wopiSaveDuration; }
private:
+ /// Initialize an HTTPRequest instance with the common settings and headers.
+ /// Older Poco versions don't support copying HTTPRequest objects, so we can't generate them.
+ void initHttpRequest(Poco::Net::HTTPRequest& request, const Poco::URI& uri,
+ const Authorization& auth, const std::string& cookies) const;
+
+private:
// Time spend in loading the file from storage
std::chrono::duration<double> _wopiLoadDuration;
std::chrono::duration<double> _wopiSaveDuration;