Changeset 51411 in webkit
- Timestamp:
- Nov 26, 2009 3:16:23 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r51410 r51411 1 2009-11-24 Holger Hans Peter Freyther <zecke@selfish.org> 2 3 Reviewed by Eric Seidel. 4 5 [Qt] Use QNetworkReply::rawHeaderPairs 6 https://bugs.webkit.org/show_bug.cgi?id=31826 7 8 The QNetworkReply is internally storing the HTTP headers 9 as a list of pairs. Currently we have to ask the QNetworkReply 10 to put all header names into a QStringList. Afterwards we will 11 iterate over this QStringList and ask the QNetworkReply to 12 give us the value for this header name. The current Qt implementation 13 is doing a linear to find the header value. 14 15 Use a new API to directly access the list of pairs and push 16 this into WebCore. This avoids doing some allocations and doing 17 linear searches from within a loop. 18 19 * platform/network/qt/QNetworkReplyHandler.cpp: 20 (WebCore::QNetworkReplyHandler::sendResponseIfNeeded): 21 1 22 2009-11-21 Holger Hans Peter Freyther <zecke@selfish.org> 2 23 -
trunk/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
r51387 r51411 308 308 309 309 // Add remaining headers. 310 #if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) 311 foreach (const QNetworkReply::RawHeaderPair& pair, m_reply->rawHeaderPairs()) { 312 response.setHTTPHeaderField(QString::fromAscii(pair.first), QString::fromAscii(pair.second)); 313 } 314 #else 310 315 foreach (const QByteArray& headerName, m_reply->rawHeaderList()) { 311 316 response.setHTTPHeaderField(QString::fromAscii(headerName), QString::fromAscii(m_reply->rawHeader(headerName))); 312 317 } 318 #endif 313 319 } 314 320
Note: See TracChangeset
for help on using the changeset viewer.