net/Socket.cpp | 4 +++- test/UnitHTTP.cpp | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-)
New commits: commit 06f3f9f0342bf18113f78b86740bb32d75de9ebd Author: Andras Timar <[email protected]> AuthorDate: Mon Jul 8 18:20:19 2019 +0200 Commit: Andras Timar <[email protected]> CommitDate: Mon Jul 8 21:05:57 2019 +0200 keep the project buildable with poco 1.7.8 Change-Id: I87957a0b928f92f02ce72b7e6a2a575f2e5bad8d Reviewed-on: https://gerrit.libreoffice.org/75241 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/net/Socket.cpp b/net/Socket.cpp index 5b863c8ae..03b839d48 100644 --- a/net/Socket.cpp +++ b/net/Socket.cpp @@ -498,7 +498,9 @@ bool StreamSocket::parseHeader(const char *clientName, if (map) map->_messageSize += contentLength; - if (request.getExpectContinue() && !_sentHTTPContinue) + const std::string& expect = request.get("Expect", ""); + bool getExpectContinue = !expect.empty() && Poco::icompare(expect, "100-continue") == 0; + if (getExpectContinue && !_sentHTTPContinue) { LOG_TRC("#" << getFD() << " got Expect: 100-continue, sending Continue"); // FIXME: should validate authentication headers early too. diff --git a/test/UnitHTTP.cpp b/test/UnitHTTP.cpp index e86593f22..1bd3f5437 100644 --- a/test/UnitHTTP.cpp +++ b/test/UnitHTTP.cpp @@ -19,6 +19,7 @@ #include <Poco/Net/HTTPRequest.h> #include <Poco/Net/HTTPResponse.h> #include <Poco/Net/HTTPSClientSession.h> +#include <Poco/StreamCopier.h> #include <Log.hpp> #include <Util.hpp> @@ -52,10 +53,10 @@ public: switch(i) { case 0: - request.setExpectContinue(false); + request.erase("Expect"); break; case 1: - request.setExpectContinue(true); + request.set("Expect", "100-continue"); break; default: break; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
