net/Socket.cpp | 4 +++- test/UnitHTTP.cpp | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-)
New commits: commit f4dbe43c3ec0d4c1b6353d3d506f609665df5f84 Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Mon Jul 8 18:20:19 2019 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Jul 8 21:05:46 2019 +0200 keep the project buildable with poco 1.7.8 Change-Id: I87957a0b928f92f02ce72b7e6a2a575f2e5bad8d Reviewed-on: https://gerrit.libreoffice.org/75231 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> diff --git a/net/Socket.cpp b/net/Socket.cpp index 8205519c9..17ceb3858 100644 --- a/net/Socket.cpp +++ b/net/Socket.cpp @@ -694,7 +694,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 5439124af..70bda0733 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 libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits