[Libreoffice-commits] online.git: wsd/Storage.cpp
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 3 15:02:38 UTC 2019
wsd/Storage.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 86a80a4ccaf129ce6c4afa60fe861506cbd0530c
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Mon Dec 2 08:09:24 2019 -0500
Commit: Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Tue Dec 3 16:02:16 2019 +0100
wsd: handle http forbidden response from wopi put
Change-Id: I597e949cd1bea612400d623f30ea260036253e89
Reviewed-on: https://gerrit.libreoffice.org/84360
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 484751352..f14954a6e 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -1054,7 +1054,8 @@ StorageBase::SaveResult WopiStorage::saveLocalFileToStorage(const Authorization&
{
saveResult.setResult(StorageBase::SaveResult::DISKFULL);
}
- else if (response.getStatus() == Poco::Net::HTTPResponse::HTTP_UNAUTHORIZED)
+ else if (response.getStatus() == Poco::Net::HTTPResponse::HTTP_UNAUTHORIZED ||
+ response.getStatus() == Poco::Net::HTTPResponse::HTTP_FORBIDDEN)
{
saveResult.setResult(StorageBase::SaveResult::UNAUTHORIZED);
}
@@ -1077,6 +1078,7 @@ StorageBase::SaveResult WopiStorage::saveLocalFileToStorage(const Authorization&
}
else
{
+ // Internal server error, and other failures.
LOG_ERR("Unexpected response to " << wopiLog << " : " << response.getStatus() <<
"Cannot save file to WOPI storage uri [" << uriAnonym << "]. Error: ");
saveResult.setResult(StorageBase::SaveResult::FAILED);
More information about the Libreoffice-commits
mailing list