From 55b8a57350fee26783b379d3897d38759903824f Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 21 Sep 2009 22:48:25 +0200 Subject: QNAM: Add direct access to the RawHeader Provide direct access to the header fields. This makes QNetworkReplyHandler::sendResponseIfNedded drop out of the profile on the loading_standalone test case. Reviewed-By: Markus Goetz --- src/network/access/qnetworkreply.cpp | 6 ++++++ src/network/access/qnetworkreply.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp index 9ab4057..0792cea 100644 --- a/src/network/access/qnetworkreply.cpp +++ b/src/network/access/qnetworkreply.cpp @@ -530,6 +530,12 @@ QByteArray QNetworkReply::rawHeader(const QByteArray &headerName) const return QByteArray(); } +const QList& QNetworkReply::rawHeaderPairs() const +{ + Q_D(const QNetworkReply); + return d->rawHeaders; +} + /*! Returns a list of headers fields that were sent by the remote server, in the order that they were sent. Duplicate headers are diff --git a/src/network/access/qnetworkreply.h b/src/network/access/qnetworkreply.h index c624810..82086c4 100644 --- a/src/network/access/qnetworkreply.h +++ b/src/network/access/qnetworkreply.h @@ -128,6 +128,9 @@ public: QList rawHeaderList() const; QByteArray rawHeader(const QByteArray &headerName) const; + typedef QPair RawHeaderPair; + const QList& rawHeaderPairs() const; + // attributes QVariant attribute(QNetworkRequest::Attribute code) const; -- cgit v0.12