[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - net/Socket.cpp test/UnitHTTP.cpp
Andras Timar (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jul 8 19:06:07 UTC 2019
net/Socket.cpp | 4 +++-
test/UnitHTTP.cpp | 5 +++--
2 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 06f3f9f0342bf18113f78b86740bb32d75de9ebd
Author: Andras Timar <andras.timar at collabora.com>
AuthorDate: Mon Jul 8 18:20:19 2019 +0200
Commit: Andras Timar <andras.timar at collabora.com>
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 <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
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;
More information about the Libreoffice-commits
mailing list