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
|
||||
}
|
||||
|
||||
if (loadedFromCache) {
|
||||
return; // no need to send the request! :)
|
||||
}
|
||||
|
||||
QList<QByteArray> headers = request.rawHeaderList();
|
||||
if (resumeOffset != 0) {
|
||||
if (headers.contains("Range")) {
|
||||
@ -677,10 +681,6 @@ void QNetworkReplyHttpImplPrivate::postRequest()
|
||||
foreach (const QByteArray &header, headers)
|
||||
httpRequest.setHeaderField(header, request.rawHeader(header));
|
||||
|
||||
if (loadedFromCache) {
|
||||
return; // no need to send the request! :)
|
||||
}
|
||||
|
||||
if (request.attribute(QNetworkRequest::HttpPipeliningAllowedAttribute).toBool() == true)
|
||||
httpRequest.setPipeliningAllowed(true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user