[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
zecke at webkit.org
zecke at webkit.org
Wed Apr 7 23:57:55 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit ab7b0e512e66d802f2d1cfacbc8ba0b049484bd4
Author: zecke at webkit.org <zecke at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Nov 26 11:16:23 2009 +0000
[Qt] Use QNetworkReply::rawHeaderPairs
https://bugs.webkit.org/show_bug.cgi?id=31826
The QNetworkReply is internally storing the HTTP headers
as a list of pairs. Currently we have to ask the QNetworkReply
to put all header names into a QStringList. Afterwards we will
iterate over this QStringList and ask the QNetworkReply to
give us the value for this header name. The current Qt implementation
is doing a linear to find the header value.
Use a new API to directly access the list of pairs and push
this into WebCore. This avoids doing some allocations and doing
linear searches from within a loop.
* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e29769e..0b239f6 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2009-11-24 Holger Hans Peter Freyther <zecke at selfish.org>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Use QNetworkReply::rawHeaderPairs
+ https://bugs.webkit.org/show_bug.cgi?id=31826
+
+ The QNetworkReply is internally storing the HTTP headers
+ as a list of pairs. Currently we have to ask the QNetworkReply
+ to put all header names into a QStringList. Afterwards we will
+ iterate over this QStringList and ask the QNetworkReply to
+ give us the value for this header name. The current Qt implementation
+ is doing a linear to find the header value.
+
+ Use a new API to directly access the list of pairs and push
+ this into WebCore. This avoids doing some allocations and doing
+ linear searches from within a loop.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+
2009-11-21 Holger Hans Peter Freyther <zecke at selfish.org>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index 3e0250d..f7bbb9d 100644
--- a/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -307,9 +307,15 @@ void QNetworkReplyHandler::sendResponseIfNeeded()
response.setHTTPStatusText(m_reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray().constData());
// Add remaining headers.
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
+ foreach (const QNetworkReply::RawHeaderPair& pair, m_reply->rawHeaderPairs()) {
+ response.setHTTPHeaderField(QString::fromAscii(pair.first), QString::fromAscii(pair.second));
+ }
+#else
foreach (const QByteArray& headerName, m_reply->rawHeaderList()) {
response.setHTTPHeaderField(QString::fromAscii(headerName), QString::fromAscii(m_reply->rawHeader(headerName)));
}
+#endif
}
QUrl redirection = m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list