summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkrequest.cpp
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2021-05-20 14:12:39 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2021-05-31 17:25:20 +0200
commit69982182a394618d4f121d2938d7d76196fe78f6 (patch)
tree32d98bc55cf0fed28d3b23ed15c7d39ee3bc29db /src/network/access/qhttpnetworkrequest.cpp
parent347310eb21facbd03d2168d67d83fdbfd6f6888c (diff)
QNetworkRequest: Add API to set a minimum archive bomb size
Fixes: QTBUG-91870 Change-Id: Ia23e8b8bcfdf65a91fe57e739242a355c681c9e6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/network/access/qhttpnetworkrequest.cpp')
-rw-r--r--src/network/access/qhttpnetworkrequest.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/network/access/qhttpnetworkrequest.cpp b/src/network/access/qhttpnetworkrequest.cpp
index 3518dba9ed..c1b859958a 100644
--- a/src/network/access/qhttpnetworkrequest.cpp
+++ b/src/network/access/qhttpnetworkrequest.cpp
@@ -57,6 +57,7 @@ QHttpNetworkRequestPrivate::QHttpNetworkRequestPrivate(const QHttpNetworkRequest
customVerb(other.customVerb),
priority(other.priority),
uploadByteDevice(other.uploadByteDevice),
+ minimumArchiveBombSize(other.minimumArchiveBombSize),
autoDecompress(other.autoDecompress),
pipeliningAllowed(other.pipeliningAllowed),
http2Allowed(other.http2Allowed),
@@ -64,7 +65,6 @@ QHttpNetworkRequestPrivate::QHttpNetworkRequestPrivate(const QHttpNetworkRequest
withCredentials(other.withCredentials),
ssl(other.ssl),
preConnect(other.preConnect),
- ignoreDecompressionRatio(other.ignoreDecompressionRatio),
needResendWithCredentials(other.needResendWithCredentials),
redirectCount(other.redirectCount),
redirectPolicy(other.redirectPolicy),
@@ -93,7 +93,8 @@ bool QHttpNetworkRequestPrivate::operator==(const QHttpNetworkRequestPrivate &ot
&& (preConnect == other.preConnect)
&& (redirectPolicy == other.redirectPolicy)
&& (peerVerifyName == other.peerVerifyName)
- && (needResendWithCredentials == other.needResendWithCredentials);
+ && (needResendWithCredentials == other.needResendWithCredentials)
+ && (minimumArchiveBombSize == other.minimumArchiveBombSize);
}
QByteArray QHttpNetworkRequest::methodName() const
@@ -405,14 +406,14 @@ void QHttpNetworkRequest::setPeerVerifyName(const QString &peerName)
d->peerVerifyName = peerName;
}
-bool QHttpNetworkRequest::ignoreDecompressionRatio()
+qint64 QHttpNetworkRequest::minimumArchiveBombSize() const
{
- return d->ignoreDecompressionRatio;
+ return d->minimumArchiveBombSize;
}
-void QHttpNetworkRequest::setIgnoreDecompressionRatio(bool enabled)
+void QHttpNetworkRequest::setMinimumArchiveBombSize(qint64 threshold)
{
- d->ignoreDecompressionRatio = enabled;
+ d->minimumArchiveBombSize = threshold;
}
QT_END_NAMESPACE