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
QHttpHeaderParser Class Reference

#include <qhttpheaderparser_p.h>

+ Collaboration diagram for QHttpHeaderParser:

Public Member Functions

 QHttpHeaderParser ()
 
void clear ()
 
bool parseHeaders (QByteArrayView headers)
 
bool parseStatus (QByteArrayView status)
 
const QHttpHeadersheaders () const
 
void setStatusCode (int code)
 
int getStatusCode () const
 
int getMajorVersion () const
 
void setMajorVersion (int version)
 
int getMinorVersion () const
 
void setMinorVersion (int version)
 
QString getReasonPhrase () const
 
void setReasonPhrase (const QString &reason)
 
QByteArray firstHeaderField (QByteArrayView name, const QByteArray &defaultValue=QByteArray()) const
 
QByteArray combinedHeaderValue (QByteArrayView name, const QByteArray &defaultValue=QByteArray()) const
 
QList< QByteArrayheaderFieldValues (QByteArrayView name) const
 
void setHeaderField (const QByteArray &name, const QByteArray &data)
 
void prependHeaderField (const QByteArray &name, const QByteArray &data)
 
void appendHeaderField (const QByteArray &name, const QByteArray &data)
 
void removeHeaderField (QByteArrayView name)
 
void clearHeaders ()
 
void setMaxHeaderFieldSize (qsizetype size)
 
qsizetype maxHeaderFieldSize () const
 
void setMaxTotalHeaderSize (qsizetype size)
 
qsizetype maxTotalHeaderSize () const
 
void setMaxHeaderFields (qsizetype count)
 
qsizetype maxHeaderFields () const
 

Detailed Description

Definition at line 47 of file qhttpheaderparser_p.h.

Constructor & Destructor Documentation

◆ QHttpHeaderParser()

QT_BEGIN_NAMESPACE QHttpHeaderParser::QHttpHeaderParser ( )

Definition at line 10 of file qhttpheaderparser.cpp.

Member Function Documentation

◆ appendHeaderField()

void QHttpHeaderParser::appendHeaderField ( const QByteArray & name,
const QByteArray & data )

Definition at line 171 of file qhttpheaderparser.cpp.

References QHttpHeaders::append().

Referenced by QHttpNetworkReplyPrivate::appendHeaderField().

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

◆ clear()

void QHttpHeaderParser::clear ( )

Definition at line 17 of file qhttpheaderparser.cpp.

References QString::clear(), and QHttpHeaders::clear().

Referenced by QHttpNetworkReplyPrivate::clearHttpLayerInformation().

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

◆ clearHeaders()

void QHttpHeaderParser::clearHeaders ( )

Definition at line 176 of file qhttpheaderparser.cpp.

References QHttpHeaders::clear().

Referenced by QHttpNetworkHeaderPrivate::clearHeaders().

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

◆ combinedHeaderValue()

QByteArray QHttpHeaderParser::combinedHeaderValue ( QByteArrayView name,
const QByteArray & defaultValue = QByteArray() ) const

Definition at line 142 of file qhttpheaderparser.cpp.

References headerFieldValues().

+ Here is the call graph for this function:

◆ firstHeaderField()

QByteArray QHttpHeaderParser::firstHeaderField ( QByteArrayView name,
const QByteArray & defaultValue = QByteArray() ) const

Definition at line 136 of file qhttpheaderparser.cpp.

References QHttpHeaders::value().

Referenced by QHttpNetworkHeaderPrivate::contentLength(), and QHttpNetworkReplyPrivate::removeAutoDecompressHeader().

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

◆ getMajorVersion()

int QHttpHeaderParser::getMajorVersion ( ) const

Definition at line 191 of file qhttpheaderparser.cpp.

Referenced by QHttpNetworkReplyPrivate::readHeader().

+ Here is the caller graph for this function:

◆ getMinorVersion()

int QHttpHeaderParser::getMinorVersion ( ) const

Definition at line 201 of file qhttpheaderparser.cpp.

Referenced by QHttpNetworkReplyPrivate::readHeader().

+ Here is the caller graph for this function:

◆ getReasonPhrase()

QString QHttpHeaderParser::getReasonPhrase ( ) const

Definition at line 211 of file qhttpheaderparser.cpp.

◆ getStatusCode()

int QHttpHeaderParser::getStatusCode ( ) const

Definition at line 181 of file qhttpheaderparser.cpp.

Referenced by QHttpNetworkReplyPrivate::expectContent(), QHttpNetworkReplyPrivate::isRedirecting(), and QHttpNetworkReplyPrivate::shouldEmitSignals().

+ Here is the caller graph for this function:

◆ headerFieldValues()

QList< QByteArray > QHttpHeaderParser::headerFieldValues ( QByteArrayView name) const

Definition at line 150 of file qhttpheaderparser.cpp.

References QHttpHeaders::values().

Referenced by combinedHeaderValue(), and QHttpNetworkHeaderPrivate::headerFieldValues().

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

◆ headers()

const QHttpHeaders & QHttpHeaderParser::headers ( ) const

Definition at line 131 of file qhttpheaderparser.cpp.

Referenced by QHttpNetworkRequest::header(), and QHttpNetworkHeaderPrivate::headers().

+ Here is the caller graph for this function:

◆ maxHeaderFields()

qsizetype QHttpHeaderParser::maxHeaderFields ( ) const
inline

Definition at line 84 of file qhttpheaderparser_p.h.

◆ maxHeaderFieldSize()

qsizetype QHttpHeaderParser::maxHeaderFieldSize ( ) const
inline

Definition at line 78 of file qhttpheaderparser_p.h.

◆ maxTotalHeaderSize()

qsizetype QHttpHeaderParser::maxTotalHeaderSize ( ) const
inline

Definition at line 81 of file qhttpheaderparser_p.h.

◆ parseHeaders()

bool QHttpHeaderParser::parseHeaders ( QByteArrayView headers)

Definition at line 37 of file qhttpheaderparser.cpp.

References QString::endsWith(), fieldNameCheck(), header(), QHttpHeaders::isEmpty(), line, Q_ASSERT, QString::size(), and QString::trimmed().

Referenced by QHttpNetworkReplyPrivate::parseHeader().

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

◆ parseStatus()

bool QHttpHeaderParser::parseStatus ( QByteArrayView status)

Definition at line 92 of file qhttpheaderparser.cpp.

References QByteArrayView::at(), QString::fromLatin1(), i, QByteArrayView::indexOf(), j, ok, QByteArrayView::size(), QByteArrayView::sliced(), QByteArrayView::startsWith(), and QString::toInt().

Referenced by QHttpNetworkReplyPrivate::parseStatus().

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

◆ prependHeaderField()

void QHttpHeaderParser::prependHeaderField ( const QByteArray & name,
const QByteArray & data )

Definition at line 166 of file qhttpheaderparser.cpp.

References QHttpHeaders::insert().

Referenced by QHttpNetworkHeaderPrivate::prependHeaderField().

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

◆ removeHeaderField()

void QHttpHeaderParser::removeHeaderField ( QByteArrayView name)

Definition at line 155 of file qhttpheaderparser.cpp.

References QHttpHeaders::removeAll().

Referenced by QHttpNetworkReplyPrivate::removeAutoDecompressHeader(), and setHeaderField().

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

◆ setHeaderField()

void QHttpHeaderParser::setHeaderField ( const QByteArray & name,
const QByteArray & data )

Definition at line 160 of file qhttpheaderparser.cpp.

References QHttpHeaders::append(), and removeHeaderField().

Referenced by QHttpNetworkHeaderPrivate::setHeaderField().

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

◆ setMajorVersion()

void QHttpHeaderParser::setMajorVersion ( int version)

Definition at line 196 of file qhttpheaderparser.cpp.

◆ setMaxHeaderFields()

void QHttpHeaderParser::setMaxHeaderFields ( qsizetype count)
inline

Definition at line 83 of file qhttpheaderparser_p.h.

◆ setMaxHeaderFieldSize()

void QHttpHeaderParser::setMaxHeaderFieldSize ( qsizetype size)
inline

Definition at line 77 of file qhttpheaderparser_p.h.

◆ setMaxTotalHeaderSize()

void QHttpHeaderParser::setMaxTotalHeaderSize ( qsizetype size)
inline

Definition at line 80 of file qhttpheaderparser_p.h.

◆ setMinorVersion()

void QHttpHeaderParser::setMinorVersion ( int version)

Definition at line 206 of file qhttpheaderparser.cpp.

◆ setReasonPhrase()

void QHttpHeaderParser::setReasonPhrase ( const QString & reason)

Definition at line 216 of file qhttpheaderparser.cpp.

◆ setStatusCode()

void QHttpHeaderParser::setStatusCode ( int code)

Definition at line 186 of file qhttpheaderparser.cpp.


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