diff --git a/wsd/ClientRequestDispatcher.cpp b/wsd/ClientRequestDispatcher.cpp index 8dd52c39febb3..03ea479ccc457 100644 --- a/wsd/ClientRequestDispatcher.cpp +++ b/wsd/ClientRequestDispatcher.cpp @@ -1108,10 +1108,8 @@ STATE_ENUM(CheckStatus, NotHttpSuccess, HostNotFound, WopiHostNotAllowed, - HostUnReachable, UnspecifiedError, ConnectionAborted, - ConnectionRefused, CertificateValidation, SSLHandshakeFail, MissingSsl, @@ -1289,15 +1287,17 @@ bool ClientRequestDispatcher::handleWopiAccessCheckRequest(const Poco::Net::HTTP { LOG_TRC("finishHandler "); - CheckStatus status = CheckStatus::Ok; const auto lastErrno = errno; - const auto httpResponse = probeSession->response(); - const auto responseState = httpResponse->state(); + const std::shared_ptr httpResponse = probeSession->response(); + const http::Response::State responseState = httpResponse->state(); + const http::StatusCode statusCode = httpResponse->statusCode(); LOG_DBG("Wopi Access Check: got response state: " << responseState << " " - << ", response status code: " <statusCode() << " " + << ", response status code: " << statusCode << " " << ", last errno: " << lastErrno); + CheckStatus status = statusCode == http::StatusCode::OK ? CheckStatus::Ok: CheckStatus::NotHttpSuccess; + if (responseState != http::Response::State::Complete) { // are TLS errors here ?