42 #include "qplatformdefs.h"
45 #if QT_CONFIG(http) || defined(Q_CLANG_QDOC)
47 #include "private/http2protocol_p.h"
49 #include "QtCore/qshareddata.h"
50 #include "QtCore/qlocale.h"
51 #include "QtCore/qdatetime.h"
54 #if QT_CONFIG(datestring)
443 { qRegisterMetaType<QNetworkRequest>(); }
460 if (
other.sslConfiguration)
465 h2Configuration =
other.h2Configuration;
466 decompressedSafetyCheckThreshold =
other.decompressedSafetyCheckThreshold;
480 && h2Configuration ==
other.h2Configuration
481 && decompressedSafetyCheckThreshold ==
other.decompressedSafetyCheckThreshold
497 qint64 decompressedSafetyCheckThreshold = 10ll * 1024ll * 1024ll;
520 d->h2Configuration.setServerPushEnabled(
false);
880 #if QT_CONFIG(http) || defined(Q_CLANG_QDOC)
904 return d->h2Configuration;
922 d->h2Configuration = configuration;
935 qint64 QNetworkRequest::decompressedSafetyCheckThreshold()
const
937 return d->decompressedSafetyCheckThreshold;
962 void QNetworkRequest::setDecompressedSafetyCheckThreshold(
qint64 threshold)
964 d->decompressedSafetyCheckThreshold = threshold;
968 #if QT_CONFIG(http) || defined(Q_CLANG_QDOC) || defined (Q_OS_WASM)
979 int QNetworkRequest::transferTimeout()
const
998 void QNetworkRequest::setTransferTimeout(
int timeout)
1008 return "Content-Type";
1011 return "Content-Length";
1017 return "Last-Modified";
1020 return "If-Modified-Since";
1029 return "If-None-Match";
1035 return "Set-Cookie";
1038 return "Content-Disposition";
1041 return "User-Agent";
1064 return value.toByteArray();
1067 switch (
value.userType()) {
1068 case QMetaType::QUrl:
1069 return value.toUrl().toEncoded();
1072 return value.toByteArray();
1077 switch (
value.userType()) {
1079 case QMetaType::QDate:
1081 case QMetaType::QDateTime:
1085 return value.toByteArray();
1090 if (cookies.
isEmpty() &&
value.userType() == qMetaTypeId<QNetworkCookie>())
1091 cookies << qvariant_cast<QNetworkCookie>(
value);
1106 if (cookies.
isEmpty() &&
value.userType() == qMetaTypeId<QNetworkCookie>())
1107 cookies << qvariant_cast<QNetworkCookie>(
value);
1124 static int parseHeaderName(
const QByteArray &headerName)
1129 switch (tolower(headerName.
at(0))) {
1190 for (
const QByteArray &cookie : cookieList) {
1192 if (parsed.
count() != 1)
1216 if (trimmedRaw ==
"*")
1237 if (trimmedRaw ==
"*")
1284 return parseHttpDate(
value);
1287 return parseETag(
value);
1290 return parseIfMatch(
value);
1293 return parseIfNoneMatch(
value);
1296 return parseCookieHeader(
value);
1362 parseAndSetHeader(
it->first,
it->second);
1369 if (
name.isEmpty()) {
1371 qWarning(
"QNetworkRequest::setHeader: invalid header value KnownHeader(%d) received",
header);
1375 if (
value.isNull()) {
1381 qWarning(
"QNetworkRequest::setHeader: QVariant of type %s cannot be used with header %s",
1386 setRawHeaderInternal(
name, rawValue);
1403 pair.second =
value;
1410 const int parsedKeyAsInt = parseHeaderName(
key);
1411 if (parsedKeyAsInt != -1) {
1414 if (
value.isNull()) {
1430 static int name_to_month(
const char* month_str)
1432 switch (month_str[0]) {
1434 switch (month_str[1]) {
1438 switch (month_str[2] ) {
1449 switch (month_str[2] ) {
1457 switch (month_str[1]) {
1487 #if QT_CONFIG(datestring)
1496 int day, year, hour, minute, second;
1499 if (sscanf_s(
value.constData(),
"%*3s, %d %3s %d %d:%d:%d 'GMT'", &day, month_name, 4, &year, &hour, &minute, &second) == 6)
1503 if (sscanf(
value.constData(),
"%*3s, %d %3s %d %d:%d:%d 'GMT'", &day, month_name, &year, &hour, &minute, &second) == 6)
1511 dt =
c.toDateTime(sansWeekday,
QLatin1String(
"dd-MMM-yy hh:mm:ss 'GMT'"));
small capitals from c petite p scientific f u
The QByteArray class provides an array of bytes.
const char * constData() const noexcept
QList< QByteArray > split(char sep) const
int qstricmp(const char *str1, const char *str2)
char at(qsizetype i) const
bool isEmpty() const noexcept
int compare(QByteArrayView a, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
bool startsWith(QByteArrayView other) const noexcept
bool endsWith(QByteArrayView other) const noexcept
QByteArrayView trimmed() const noexcept
The QDate class provides date functions.
The QDateTime class provides date and time functions.
void setTimeSpec(Qt::TimeSpec spec)
bool remove(const Key &key)
bool contains(const Key &key) const noexcept
T value(const Key &key) const noexcept
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
iterator insert(const Key &key, const T &value)
The QHttp2Configuration class controls HTTP/2 parameters and settings.
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
qsizetype size() const noexcept
bool isEmpty() const noexcept
const_iterator constBegin() const noexcept
qsizetype removeIf(Predicate pred)
qsizetype count() const noexcept
void append(parameter_type t)
const_iterator constEnd() const noexcept
const_iterator ConstIterator
QString toString(qlonglong i) const
The QNetworkCookie class holds one network cookie.
static QList< QNetworkCookie > parseCookies(const QByteArray &cookieString)
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
bool operator==(const QNetworkRequest &other) const
void setOriginatingObject(QObject *object)
@ ContentDispositionHeader
void setSslConfiguration(const QSslConfiguration &configuration)
void setHeader(KnownHeaders header, const QVariant &value)
void setAttribute(Attribute code, const QVariant &value)
Priority priority() const
QVariant attribute(Attribute code, const QVariant &defaultValue=QVariant()) const
QVariant header(KnownHeaders header) const
void setRawHeader(const QByteArray &headerName, const QByteArray &value)
QObject * originatingObject() const
QNetworkRequest & operator=(QNetworkRequest &&other) noexcept
int maximumRedirectsAllowed() const
QList< QByteArray > rawHeaderList() const
void setPeerVerifyName(const QString &peerName)
bool hasRawHeader(const QByteArray &headerName) const
void setMaximumRedirectsAllowed(int maximumRedirectsAllowed)
void setUrl(const QUrl &url)
void setPriority(Priority priority)
QString peerVerifyName() const
QByteArray rawHeader(const QByteArray &headerName) const
QSslConfiguration sslConfiguration() const
~QNetworkRequestPrivate()
QSslConfiguration * sslConfiguration
bool operator==(const QNetworkRequestPrivate &other) const
QNetworkRequest::Priority priority
static const int maxRedirectCount
QNetworkRequestPrivate(const QNetworkRequestPrivate &other)
The QObject class is the base class of all Qt objects.
The QSharedData class is a base class for shared data objects. \reentrant.
The QSslConfiguration class holds the configuration and state of an SSL connection.
static QSslConfiguration defaultConfiguration()
The QString class provides a Unicode character string.
QByteArray toLatin1() const &
static QString fromLatin1(QByteArrayView ba)
The QStringList class provides a list of strings.
The QTime class provides clock time functions.
The QUrl class provides a convenient interface for working with URLs.
static QUrl fromEncoded(const QByteArray &url, ParsingMode mode=TolerantMode)
The QVariant class acts like a union for the most common Qt data types.
static auto fromValue(const T &value) -> std::enable_if_t< std::is_copy_constructible_v< T >, QVariant >
@ defaultSessionWindowSize
const qint32 maxSessionReceiveWindowSize((quint32(1)<< 31) - 1)
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION QByteArrayView trimmed(QByteArrayView s) noexcept
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld endif[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld SRC pixld MASK if DST_R else pixld DST_R endif if
QList< QString > QStringList
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
EGLOutputLayerEXT EGLint EGLAttrib value
GLbitfield GLuint64 timeout
[4]
#define QStringLiteral(str)
QUrl url("http://www.example.com/List of holidays.xml")
[0]
QHttpRequestHeader header("GET", QUrl::toPercentEncoding("/index.html"))
[1]