wsd/Storage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 86a80a4ccaf129ce6c4afa60fe861506cbd0530c Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> AuthorDate: Mon Dec 2 08:09:24 2019 -0500 Commit: Ashod Nakashian <ashnak...@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 <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits