From 82f3c4159d2d8a239edef8a5a566e349a98f6faf Mon Sep 17 00:00:00 2001 From: nowrep Date: Sat, 30 Mar 2013 21:52:59 +0100 Subject: [PATCH] Disabling HttpPipelining fixes video loading issue on YouTube. Closes #830 --- src/lib/network/networkmanager.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/lib/network/networkmanager.cpp b/src/lib/network/networkmanager.cpp index 848f3c7c6..21c2ca403 100644 --- a/src/lib/network/networkmanager.cpp +++ b/src/lib/network/networkmanager.cpp @@ -464,6 +464,7 @@ void NetworkManager::proxyAuthentication(const QNetworkProxy &proxy, QAuthentica QNetworkReply* NetworkManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice* outgoingData) { + if (op == PostOperation && outgoingData) { QByteArray outgoingDataByteArray = outgoingData->peek(1024 * 1024); mApp->autoFill()->post(request, outgoingDataByteArray); @@ -514,10 +515,8 @@ QNetworkReply* NetworkManager::createRequest(QNetworkAccessManager::Operation op req.setRawHeader("Accept-Language", m_acceptLanguage); - req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true); -// if (req.attribute(QNetworkRequest::CacheLoadControlAttribute).toInt() == QNetworkRequest::PreferNetwork) { -// req.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache); -// } + // #830: Disabling HttpPipeling fixes issue with loading HTML5 videos on YouTube + //req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true); // Adblock if (op == QNetworkAccessManager::GetOperation) { @@ -530,8 +529,7 @@ QNetworkReply* NetworkManager::createRequest(QNetworkAccessManager::Operation op } } - reply = QNetworkAccessManager::createRequest(op, req, outgoingData); - return reply; + return QNetworkAccessManager::createRequest(op, req, outgoingData); } void NetworkManager::removeLocalCertificate(const QSslCertificate &cert)