diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index 351973bf491..3acbfff70f0 100644 --- a/src/network/access/qnetworkreplyhttpimpl.cpp +++ b/src/network/access/qnetworkreplyhttpimpl.cpp @@ -650,6 +650,10 @@ void QNetworkReplyHttpImplPrivate::postRequest() break; // can't happen } + if (loadedFromCache) { + return; // no need to send the request! :) + } + QList 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);