Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qnetworkrequest.cpp File Reference

(f6b1744b54e7883550c56daa508039061813f790)

#include "qnetworkrequest.h"
#include "qnetworkrequest_p.h"
#include "qplatformdefs.h"
#include "qnetworkcookie.h"
#include "qsslconfiguration.h"
#include "qhttpheadershelper_p.h"
#include "QtCore/qdatetime.h"
#include "QtCore/qlocale.h"
#include "QtCore/qshareddata.h"
#include "QtCore/qtimezone.h"
#include "QtCore/private/qduplicatetracker_p.h"
#include "QtCore/private/qtools_p.h"
#include <algorithm>
#include <q20algorithm.h>
#include "moc_qnetworkrequest.cpp"
Include dependency graph for qnetworkrequest.cpp:

Go to the source code of this file.

Classes

class  QNetworkRequestPrivate
 \variable QNetworkRequest::DefaultTransferTimeout More...

Functions

static std::optional< QNetworkRequest::KnownHeaderstoKnownHeader (QHttpHeaders::WellKnownHeader key)
static std::optional< QHttpHeaders::WellKnownHeadertoWellKnownHeader (QNetworkRequest::KnownHeaders key)
static QByteArray makeCookieHeader (const QList< QNetworkCookie > &cookies, QNetworkCookie::RawForm type, QByteArrayView separator)
static QByteArray makeCookieHeader (const QVariant &value, QNetworkCookie::RawForm type, QByteArrayView separator)
static QByteArray headerValue (QNetworkRequest::KnownHeaders header, const QVariant &value)
static int parseHeaderName (QByteArrayView headerName)
static QVariant parseHttpDate (QByteArrayView raw)
static QList< QNetworkCookieparseCookieHeader (QByteArrayView raw)
static QVariant parseETag (QByteArrayView raw)
template<typename T>
static QStringList parseMatchImpl (QByteArrayView raw, T op)
static QStringList parseIfMatch (QByteArrayView raw)
static QStringList parseIfNoneMatch (QByteArrayView raw)
static QVariant parseHeaderValue (QNetworkRequest::KnownHeaders header, QByteArrayView value)
static QVariant parseHeaderValue (QNetworkRequest::KnownHeaders header, QList< QByteArray > values)
static bool isSetCookie (QByteArrayView name)
static bool isSetCookie (QHttpHeaders::WellKnownHeader name)
template<class HeaderName>
static void setFromRawHeader (QHttpHeaders &headers, HeaderName header, QByteArrayView value)
static int name_to_month (const char *month_str)

Variables

static constexpr HeaderPair knownHeadersArr []

Function Documentation

◆ headerValue()

QByteArray headerValue ( QNetworkRequest::KnownHeaders header,
const QVariant & value )
static

Definition at line 1288 of file qnetworkrequest.cpp.

◆ isSetCookie() [1/2]

bool isSetCookie ( QByteArrayView name)
static

Definition at line 1542 of file qnetworkrequest.cpp.

◆ isSetCookie() [2/2]

bool isSetCookie ( QHttpHeaders::WellKnownHeader name)
static

Definition at line 1548 of file qnetworkrequest.cpp.

◆ makeCookieHeader() [1/2]

QByteArray makeCookieHeader ( const QList< QNetworkCookie > & cookies,
QNetworkCookie::RawForm type,
QByteArrayView separator )
static

Definition at line 1265 of file qnetworkrequest.cpp.

◆ makeCookieHeader() [2/2]

QByteArray makeCookieHeader ( const QVariant & value,
QNetworkCookie::RawForm type,
QByteArrayView separator )
static

Definition at line 1279 of file qnetworkrequest.cpp.

◆ name_to_month()

int name_to_month ( const char * month_str)
static

Definition at line 1728 of file qnetworkrequest.cpp.

◆ parseCookieHeader()

QList< QNetworkCookie > parseCookieHeader ( QByteArrayView raw)
static

Definition at line 1400 of file qnetworkrequest.cpp.

◆ parseETag()

QVariant parseETag ( QByteArrayView raw)
static

Definition at line 1414 of file qnetworkrequest.cpp.

◆ parseHeaderName()

int parseHeaderName ( QByteArrayView headerName)
static

Definition at line 1334 of file qnetworkrequest.cpp.

◆ parseHeaderValue() [1/2]

QVariant parseHeaderValue ( QNetworkRequest::KnownHeaders header,
QByteArrayView value )
static

Definition at line 1457 of file qnetworkrequest.cpp.

◆ parseHeaderValue() [2/2]

QVariant parseHeaderValue ( QNetworkRequest::KnownHeaders header,
QList< QByteArray > values )
static

Definition at line 1507 of file qnetworkrequest.cpp.

◆ parseHttpDate()

QVariant parseHttpDate ( QByteArrayView raw)
static

Definition at line 1392 of file qnetworkrequest.cpp.

◆ parseIfMatch()

QStringList parseIfMatch ( QByteArrayView raw)
static

Definition at line 1442 of file qnetworkrequest.cpp.

◆ parseIfNoneMatch()

QStringList parseIfNoneMatch ( QByteArrayView raw)
static

Definition at line 1449 of file qnetworkrequest.cpp.

◆ parseMatchImpl()

template<typename T>
QStringList parseMatchImpl ( QByteArrayView raw,
T op )
static

Definition at line 1427 of file qnetworkrequest.cpp.

◆ setFromRawHeader()

template<class HeaderName>
void setFromRawHeader ( QHttpHeaders & headers,
HeaderName header,
QByteArrayView value )
static

Definition at line 1554 of file qnetworkrequest.cpp.

◆ toKnownHeader()

std::optional< QNetworkRequest::KnownHeaders > toKnownHeader ( QHttpHeaders::WellKnownHeader key)
static

Definition at line 1248 of file qnetworkrequest.cpp.

References knownHeadersArr.

◆ toWellKnownHeader()

std::optional< QHttpHeaders::WellKnownHeader > toWellKnownHeader ( QNetworkRequest::KnownHeaders key)
static

Definition at line 1256 of file qnetworkrequest.cpp.

References knownHeadersArr.

Variable Documentation

◆ knownHeadersArr

constexpr HeaderPair knownHeadersArr
staticconstexpr
Initial value:
= {
}

Definition at line 1229 of file qnetworkrequest.cpp.

Referenced by toKnownHeader(), and toWellKnownHeader().