7#include "private/qhttpnetworkrequest_p.h"
8#include "private/qhttpnetworkreply_p.h"
12#include <QtCore/qbytearray.h>
13#include <QtCore/qstring.h>
30 {0x50, 0x52, 0x49, 0x20, 0x2a, 0x20,
31 0x48, 0x54, 0x54, 0x50, 0x2f, 0x32,
32 0x2e, 0x30, 0x0d, 0x0a, 0x0d, 0x0a,
33 0x53, 0x4d, 0x0d, 0x0a, 0x0d, 0x0a};
40 builder.
append(Settings::ENABLE_PUSH_ID);
45 builder.
append(Settings::INITIAL_WINDOW_SIZE_ID);
50 builder.
append(Settings::MAX_FRAME_SIZE_ID);
64 const char *
src =
reinterpret_cast<const char *
>(
frame.dataBegin());
84 value +=
"Upgrade, HTTP2-Settings";
87 request->setHeaderField(
"Upgrade",
"h2c");
99 errorMessage =
"RST_STREAM with unknown error code (%1)"_L1;
106 switch (http2Error) {
129 errorMessage =
"Server received frame(s) on a half-closed stream"_L1;
133 errorMessage =
"Server received a frame with an invalid size"_L1;
146 "header compression context for the connection"_L1;
151 errorMessage =
"The connection established in response "
152 "to a CONNECT request was reset or abnormally closed"_L1;
156 errorMessage =
"Server dislikes our behavior, excessive load detected."_L1;
160 errorMessage =
"The underlying transport has properties "
161 "that do not meet minimum security "
167 "be used instead of HTTP/2."_L1;
189 if (
reply.statusCode() == 101) {
void append(ValueType val)
static QByteArray fromRawData(const char *data, qsizetype size)
Constructs a QByteArray that uses the first size bytes of the data array.
The QHttp2Configuration class controls HTTP/2 parameters and settings.
QVariant header(QNetworkRequest::KnownHeaders header) const
Returns the value of the known header header, if that header was sent by the remote server.
NetworkError
Indicates all possible error conditions found during the processing of the request.
\macro QT_RESTRICTED_CAST_FROM_ASCII
void clear()
Clears the contents of the string and makes it null.
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
Frame configurationToSettingsFrame(const QHttp2Configuration &config)
const char Http2clientPreface[clientPrefaceLength]
bool is_protocol_upgraded(const QHttpNetworkReply &reply)
void appendProtocolUpgradeHeaders(const QHttp2Configuration &config, QHttpNetworkRequest *request)
@ defaultSessionWindowSize
QByteArray settingsFrameToBase64(const Frame &frame)
void qt_error(quint32 errorCode, QNetworkReply::NetworkError &error, QString &errorMessage)
Combined button and popup list for selecting options.
std::pair< T1, T2 > QPair
DBusConnection const char DBusError * error
static QString header(const QString &name)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
Q_DECL_COLD_FUNCTION Q_CORE_EXPORT QString qt_error_string(int errorCode=-1)
#define Q_LOGGING_CATEGORY(name,...)
GLuint GLsizei const GLchar * message
static QString errorMessage(QUrlPrivate::ErrorCode errorCode, const QString &errorSource, qsizetype errorPosition)
QNetworkRequest request(url)