Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QNetworkHeadersPrivate Class Reference

#include <qnetworkrequest_p.h>

+ Inheritance diagram for QNetworkHeadersPrivate:
+ Collaboration diagram for QNetworkHeadersPrivate:

Public Types

typedef QPair< QByteArray, QByteArrayRawHeaderPair
 
typedef QList< RawHeaderPairRawHeadersList
 
typedef QHash< QNetworkRequest::KnownHeaders, QVariantCookedHeadersMap
 
typedef QHash< QNetworkRequest::Attribute, QVariantAttributesMap
 
typedef QList< QNetworkCookieNetworkCookieList
 

Public Member Functions

const RawHeadersListallRawHeaders () const
 
QList< QByteArrayrawHeadersKeys () const
 
QByteArray rawHeader (QAnyStringView headerName) const
 
void setRawHeader (const QByteArray &key, const QByteArray &value)
 
void setCookedHeader (QNetworkRequest::KnownHeaders header, const QVariant &value)
 
QHttpHeaders headers () const
 
void setHeaders (const QHttpHeaders &newHeaders)
 
void setHeaders (QHttpHeaders &&newHeaders)
 
void setHeader (QHttpHeaders::WellKnownHeader name, QByteArrayView value)
 
void clearHeaders ()
 

Static Public Member Functions

static QDateTime fromHttpDate (QByteArrayView value)
 
static QByteArray toHttpDate (const QDateTime &dt)
 
static std::optional< qint64toInt (QByteArrayView value)
 
static QByteArray fromCookieList (const NetworkCookieList &cookies)
 
static std::optional< NetworkCookieListtoSetCookieList (const QList< QByteArray > &values)
 
static std::optional< NetworkCookieListtoCookieList (const QList< QByteArray > &values)
 
static RawHeadersList fromHttpToRaw (const QHttpHeaders &headers)
 
static QHttpHeaders fromRawToHttp (const RawHeadersList &raw)
 

Public Attributes

struct { 
 
   RawHeadersList   headersList 
 
   bool   isCached = false 
 
rawHeaderCache 
 
QHttpHeaders httpHeaders
 
CookedHeadersMap cookedHeaders
 
AttributesMap attributes
 
QPointer< QObjectoriginatingObject
 

Detailed Description

Definition at line 33 of file qnetworkrequest_p.h.

Member Typedef Documentation

◆ AttributesMap

◆ CookedHeadersMap

◆ NetworkCookieList

◆ RawHeaderPair

◆ RawHeadersList

Member Function Documentation

◆ allRawHeaders()

const QNetworkHeadersPrivate::RawHeadersList & QNetworkHeadersPrivate::allRawHeaders ( ) const

Definition at line 1447 of file qnetworkrequest.cpp.

References fromHttpToRaw(), httpHeaders, and rawHeaderCache.

+ Here is the call graph for this function:

◆ clearHeaders()

void QNetworkHeadersPrivate::clearHeaders ( )

Definition at line 1569 of file qnetworkrequest.cpp.

References QHttpHeaders::clear(), QHash< Key, T >::clear(), cookedHeaders, and httpHeaders.

Referenced by QNetworkReplyHttpImplPrivate::followRedirect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromCookieList()

QByteArray QNetworkHeadersPrivate::fromCookieList ( const NetworkCookieList & cookies)
static

Definition at line 1781 of file qnetworkrequest.cpp.

References makeCookieHeader(), and QNetworkCookie::NameAndValueOnly.

Referenced by QNetworkAccessManager::createRequest(), and QNetworkReplyHttpImplPrivate::onRedirected().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromHttpDate()

QDateTime QNetworkHeadersPrivate::fromHttpDate ( QByteArrayView value)
static

Definition at line 1651 of file qnetworkrequest.cpp.

References QLocale::c(), QString::fromLatin1(), name_to_month(), pos, Qt::TextDate, and QTimeZone::UTC.

Referenced by QNetworkReplyHttpImplPrivate::fetchCacheMetaData(), QNetworkReplyHttpImplPrivate::loadFromCacheIfAllowed(), and parseHttpDate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromHttpToRaw()

QNetworkHeadersPrivate::RawHeadersList QNetworkHeadersPrivate::fromHttpToRaw ( const QHttpHeaders & headers)
static

Definition at line 1700 of file qnetworkrequest.cpp.

References QList< T >::emplaceBack(), headers(), i, QHttpHeaders::isEmpty(), isSetCookie(), it, list, QHttpHeaders::nameAt(), QByteArray(), QList< T >::reserve(), QHttpHeaders::SetCookie, QList< T >::size(), QHttpHeaders::size(), QHttpHeaders::valueAt(), and QHttpHeaders::wellKnownHeaderName().

Referenced by allRawHeaders(), and QNetworkCacheMetaData::rawHeaders().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromRawToHttp()

QHttpHeaders QNetworkHeadersPrivate::fromRawToHttp ( const RawHeadersList & raw)
static

Definition at line 1731 of file qnetworkrequest.cpp.

References QHttpHeaders::append(), Qt::CaseInsensitive, header(), headers(), isSetCookie(), QHttpHeaders::reserve(), QHttpHeaders::SetCookie, QLatin1StringView::tokenize(), and QHttpHeaders::wellKnownHeaderName().

Referenced by QNetworkCacheMetaData::setRawHeaders().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ headers()

◆ rawHeader()

QByteArray QNetworkHeadersPrivate::rawHeader ( QAnyStringView headerName) const

Definition at line 1478 of file qnetworkrequest.cpp.

References Qt::CaseInsensitive, QHttpHeaders::combinedValue(), QAnyStringView::compare(), httpHeaders, i, QHttpHeaders::nameAt(), QHttpHeaders::SetCookie, QHttpHeaders::size(), QHttpHeaders::valueAt(), and QHttpHeaders::wellKnownHeaderName().

Referenced by QNetworkProxy::rawHeader(), and QNetworkRequest::rawHeader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rawHeadersKeys()

QList< QByteArray > QNetworkHeadersPrivate::rawHeadersKeys ( ) const

Definition at line 1457 of file qnetworkrequest.cpp.

References httpHeaders, i, QHttpHeaders::isEmpty(), QHttpHeaders::nameAt(), QByteArray(), and QHttpHeaders::size().

Referenced by QNetworkRequest::rawHeaderList(), and QNetworkProxy::rawHeaderList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCookedHeader()

void QNetworkHeadersPrivate::setCookedHeader ( QNetworkRequest::KnownHeaders header,
const QVariant & value )

Definition at line 1509 of file qnetworkrequest.cpp.

References cookedHeaders, header(), headerValue(), httpHeaders, QHash< Key, T >::insert(), QByteArray::isEmpty(), qWarning, QHash< Key, T >::remove(), QHttpHeaders::removeAll(), setFromRawHeader(), toWellKnownHeader(), QHttpHeaders::value(), and QHttpHeaders::wellKnownHeaderName().

Referenced by QNetworkRequest::setHeader(), QHttpPart::setHeader(), and QNetworkProxy::setHeader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHeader()

void QNetworkHeadersPrivate::setHeader ( QHttpHeaders::WellKnownHeader name,
QByteArrayView value )

Definition at line 1557 of file qnetworkrequest.cpp.

References httpHeaders, QHttpHeaders::replaceOrAppend(), and toKnownHeader().

+ Here is the call graph for this function:

◆ setHeaders() [1/2]

void QNetworkHeadersPrivate::setHeaders ( const QHttpHeaders & newHeaders)

Definition at line 1543 of file qnetworkrequest.cpp.

References httpHeaders.

Referenced by QNetworkReplyHttpImplPrivate::sendCacheContents(), QNetworkRequest::setHeaders(), QNetworkProxy::setHeaders(), QNetworkRequest::setHeaders(), and QNetworkProxy::setHeaders().

+ Here is the caller graph for this function:

◆ setHeaders() [2/2]

void QNetworkHeadersPrivate::setHeaders ( QHttpHeaders && newHeaders)

Definition at line 1550 of file qnetworkrequest.cpp.

References httpHeaders.

◆ setRawHeader()

void QNetworkHeadersPrivate::setRawHeader ( const QByteArray & key,
const QByteArray & value )

Definition at line 1497 of file qnetworkrequest.cpp.

References httpHeaders, and setFromRawHeader().

Referenced by QHttpPart::setRawHeader(), QNetworkRequest::setRawHeader(), and QNetworkProxy::setRawHeader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toCookieList()

std::optional< QNetworkHeadersPrivate::NetworkCookieList > QNetworkHeadersPrivate::toCookieList ( const QList< QByteArray > & values)
static

Definition at line 1786 of file qnetworkrequest.cpp.

References parseCookieHeader().

Referenced by parseHeaderValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toHttpDate()

QByteArray QNetworkHeadersPrivate::toHttpDate ( const QDateTime & dt)
static

Definition at line 1695 of file qnetworkrequest.cpp.

References QLocale::c().

Referenced by QNetworkReplyFileImpl::QNetworkReplyFileImpl(), headerValue(), QNetworkReplyHttpImplPrivate::loadFromCacheIfAllowed(), and QNetworkFile::open().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toInt()

◆ toSetCookieList()

std::optional< QNetworkHeadersPrivate::NetworkCookieList > QNetworkHeadersPrivate::toSetCookieList ( const QList< QByteArray > & values)
static

Definition at line 1766 of file qnetworkrequest.cpp.

References QNetworkCookie::parseCookies().

Referenced by QNetworkReplyHttpImplPrivate::_q_metaDataChanged(), and QNetworkReplyImplPrivate::metaDataChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ attributes

◆ cookedHeaders

CookedHeadersMap QNetworkHeadersPrivate::cookedHeaders

◆ headersList

RawHeadersList QNetworkHeadersPrivate::headersList

Definition at line 42 of file qnetworkrequest_p.h.

◆ httpHeaders

◆ isCached

bool QNetworkHeadersPrivate::isCached = false

Definition at line 43 of file qnetworkrequest_p.h.

◆ originatingObject

QPointer<QObject> QNetworkHeadersPrivate::originatingObject

◆ [struct]

struct { ... } QNetworkHeadersPrivate::rawHeaderCache

Referenced by allRawHeaders().


The documentation for this class was generated from the following files: