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

(68e9694fc53ac97db68b77c2776d4f7b3ff23777)

#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 1278 of file qnetworkrequest.cpp.

◆ isSetCookie() [1/2]

bool isSetCookie ( QByteArrayView name)
static

Definition at line 1532 of file qnetworkrequest.cpp.

◆ isSetCookie() [2/2]

bool isSetCookie ( QHttpHeaders::WellKnownHeader name)
static

Definition at line 1538 of file qnetworkrequest.cpp.

◆ makeCookieHeader() [1/2]

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

Definition at line 1255 of file qnetworkrequest.cpp.

◆ makeCookieHeader() [2/2]

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

Definition at line 1269 of file qnetworkrequest.cpp.

◆ name_to_month()

int name_to_month ( const char * month_str)
static

Definition at line 1718 of file qnetworkrequest.cpp.

◆ parseCookieHeader()

QList< QNetworkCookie > parseCookieHeader ( QByteArrayView raw)
static

Definition at line 1390 of file qnetworkrequest.cpp.

◆ parseETag()

QVariant parseETag ( QByteArrayView raw)
static

Definition at line 1404 of file qnetworkrequest.cpp.

◆ parseHeaderName()

int parseHeaderName ( QByteArrayView headerName)
static

Definition at line 1324 of file qnetworkrequest.cpp.

◆ parseHeaderValue() [1/2]

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

Definition at line 1447 of file qnetworkrequest.cpp.

◆ parseHeaderValue() [2/2]

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

Definition at line 1497 of file qnetworkrequest.cpp.

◆ parseHttpDate()

QVariant parseHttpDate ( QByteArrayView raw)
static

Definition at line 1382 of file qnetworkrequest.cpp.

◆ parseIfMatch()

QStringList parseIfMatch ( QByteArrayView raw)
static

Definition at line 1432 of file qnetworkrequest.cpp.

◆ parseIfNoneMatch()

QStringList parseIfNoneMatch ( QByteArrayView raw)
static

Definition at line 1439 of file qnetworkrequest.cpp.

◆ parseMatchImpl()

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

Definition at line 1417 of file qnetworkrequest.cpp.

◆ setFromRawHeader()

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

Definition at line 1544 of file qnetworkrequest.cpp.

◆ toKnownHeader()

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

Definition at line 1238 of file qnetworkrequest.cpp.

References knownHeadersArr.

◆ toWellKnownHeader()

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

Definition at line 1246 of file qnetworkrequest.cpp.

References knownHeadersArr.

Variable Documentation

◆ knownHeadersArr

constexpr HeaderPair knownHeadersArr
staticconstexpr
Initial value:
= {
}

Definition at line 1219 of file qnetworkrequest.cpp.

Referenced by toKnownHeader(), and toWellKnownHeader().