aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-06-26 19:05:36 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-06-26 19:05:36 +0200
commitb1e84568dbb70dc4fa24a915c6d15438be958378 (patch)
tree87ad83f87466ba77078e478448c603525ab2511a
parentd70b2d29c11ec7a0e177c2979beeab9ddb6eb5c3 (diff)
downloadlibquotient-b1e84568dbb70dc4fa24a915c6d15438be958378.tar.gz
libquotient-b1e84568dbb70dc4fa24a915c6d15438be958378.zip
Disable HTTP2; enable pipelining
Long run tests over 2+ days kept crashing before this commit but stopped crashing with pipelining on and HTTP2 off.
-rw-r--r--lib/jobs/basejob.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp
index 7774a6e2..465287c6 100644
--- a/lib/jobs/basejob.cpp
+++ b/lib/jobs/basejob.cpp
@@ -298,16 +298,17 @@ void BaseJob::Private::sendRequest()
req.setAttribute(QNetworkRequest::BackgroundRequestAttribute, inBackground);
req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
req.setMaximumRedirectsAllowed(10);
- // Pipelining doesn't fly quite well with SSL, occasionally crashing at
- // what seems like an attempt to write to a closed channel.
-// req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
+ req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
req.setAttribute(
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
QNetworkRequest::Http2AllowedAttribute
#else
QNetworkRequest::HTTP2AllowedAttribute
#endif
- , true);
+ // Qt doesn't combine HTTP2 with SSL quite right, occasionally crashing at
+ // what seems like an attempt to write to a closed channel. If/when that
+ // changes, false should be turned to true below.
+ , false);
Q_ASSERT(req.url().isValid());
for (auto it = requestHeaders.cbegin(); it != requestHeaders.cend(); ++it)
req.setRawHeader(it.key(), it.value());