HTTP Network Reply Impl: return earlier when resource loaded from cache
This commit is contained in:
parent
7876177c0c
commit
2aba57d58e
@ -650,6 +650,10 @@ void QNetworkReplyHttpImplPrivate::postRequest()
|
|||||||
break; // can't happen
|
break; // can't happen
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (loadedFromCache) {
|
||||||
|
return; // no need to send the request! :)
|
||||||
|
}
|
||||||
|
|
||||||
QList<QByteArray> headers = request.rawHeaderList();
|
QList<QByteArray> headers = request.rawHeaderList();
|
||||||
if (resumeOffset != 0) {
|
if (resumeOffset != 0) {
|
||||||
if (headers.contains("Range")) {
|
if (headers.contains("Range")) {
|
||||||
@ -677,10 +681,6 @@ void QNetworkReplyHttpImplPrivate::postRequest()
|
|||||||
foreach (const QByteArray &header, headers)
|
foreach (const QByteArray &header, headers)
|
||||||
httpRequest.setHeaderField(header, request.rawHeader(header));
|
httpRequest.setHeaderField(header, request.rawHeader(header));
|
||||||
|
|
||||||
if (loadedFromCache) {
|
|
||||||
return; // no need to send the request! :)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (request.attribute(QNetworkRequest::HttpPipeliningAllowedAttribute).toBool() == true)
|
if (request.attribute(QNetworkRequest::HttpPipeliningAllowedAttribute).toBool() == true)
|
||||||
httpRequest.setPipeliningAllowed(true);
|
httpRequest.setPipeliningAllowed(true);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user