5#ifndef QNETWORKREPLYHTTPIMPL_P_H
6#define QNETWORKREPLYHTTPIMPL_P_H
19#include <QtNetwork/private/qtnetworkglobal_p.h>
23#include "QtCore/qpointer.h"
24#include "QtCore/qdatetime.h"
25#include "QtCore/qsharedpointer.h"
26#include "QtCore/qtimer.h"
29#include <QtNetwork/QNetworkCacheMetaData>
30#include <private/qhttpnetworkrequest_p.h>
31#include <private/qnetworkreply_p.h>
32#include <QtNetwork/QNetworkProxy>
35#include <QtNetwork/QSslConfiguration>
40Q_MOC_INCLUDE(<QtNetwork/QAuthenticator>)
42#include <private/qdecompresshelper_p.h>
46QT_REQUIRE_CONFIG(http);
90#ifndef QT_NO_NETWORKPROXY
121 void haveUploadData(
const qint64 pos,
const QByteArray &dataArray,
bool dataAtEnd, qint64 dataSize);
148 void error(QNetworkReply::NetworkError code,
const QString &errorString);
149 void _q_error(QNetworkReply::NetworkError code,
const QString &errorString);
175 void onRedirected(
const QUrl &redirectUrl,
int httpStatus,
int maxRedirectsRemainig);
195#ifndef QT_NO_NETWORKPROXY
241 void postRequest(
const QNetworkRequest& newHttpRequest);
254 void httpError(QNetworkReply::NetworkError error,
const QString &errorString);
257 void replySslErrors(
const QList<QSslError> &,
bool *, QList<QSslError> *);
261#ifndef QT_NO_NETWORKPROXY
273 Q_DECLARE_PUBLIC(QNetworkReplyHttpImpl)
void setResumeOffset(quint64 offset)
QNetworkRequest createRedirectRequest(const QNetworkRequest &originalRequests, const QUrl &url, int maxRedirectsRemainig)
void setupTransferTimeout()
QSharedPointer< char > downloadBufferPointer
QNetworkCacheMetaData fetchCacheMetaData(const QNetworkCacheMetaData &metaData) const
void _q_error(QNetworkReply::NetworkError code, const QString &errorString)
void wantUploadDataSlot(qint64)
void _q_bufferOutgoingDataFinished()
qint64 uploadByteDevicePosition
void resetUploadDataSlot(bool *r)
void setCachingEnabled(bool enable)
void httpError(QNetworkReply::NetworkError error, const QString &errorString)
std::shared_ptr< QAtomicInt > pendingDownloadProgressEmissions
void _q_bufferOutgoingData()
QNetworkAccessManagerPrivate * managerPrivate
void replyDownloadMetaData(const QHttpHeaders &, int, const QString &, bool, QSharedPointer< char >, qint64, qint64, bool, bool)
bool pendingIgnoreAllSslErrors
qint64 downloadBufferCurrentSize
QHttpNetworkRequest httpRequest
void _q_cacheSaveDeviceAboutToClose()
char * downloadZerocopyBuffer
qint64 downloadBufferReadPosition
void replySslConfigurationChanged(const QSslConfiguration &newSslConfiguration)
void onRedirected(const QUrl &redirectUrl, int httpStatus, int maxRedirectsRemainig)
void maybeDropUploadDevice(const QNetworkRequest &newHttpRequest)
void error(QNetworkReply::NetworkError code, const QString &errorString)
qint64 lastReadyReadEmittedSize
QNetworkAccessManager::Operation getRedirectOperation(QNetworkAccessManager::Operation currentOp, int httpStatus)
~QNetworkReplyHttpImplPrivate()
QDecompressHelper decompressHelper
void initCacheSaveDevice()
std::shared_ptr< QNonContiguousByteDevice > uploadByteDevice
QNetworkProxy lastProxyAuthentication
void httpAuthenticationRequired(const QHttpNetworkRequest &request, QAuthenticator *auth)
void replyDownloadProgressSlot(qint64, qint64)
void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth)
bool sendCacheContents(const QNetworkCacheMetaData &metaData)
void checkForRedirect(const int statusCode)
QNetworkReplyHttpImplPrivate()
QIODevice * cacheLoadDevice
QNonContiguousByteDevice * createUploadByteDevice()
std::shared_ptr< QAtomicInt > pendingDownloadDataEmissions
QNetworkAccessManager * manager
void emitReplyUploadProgress(qint64 bytesSent, qint64 bytesTotal)
void _q_metaDataChanged()
void uploadByteDeviceReadyReadSlot()
void replySslErrors(const QList< QSslError > &, bool *, QList< QSslError > *)
QNetworkRequest redirectRequest
bool isCachingEnabled() const
void replyDownloadData(QByteArray)
QUrl urlForLastAuthentication
bool isCachingAllowed() const
bool loadFromCacheIfAllowed(QHttpNetworkRequest &httpRequest)
std::shared_ptr< QRingBuffer > outgoingDataBuffer
std::unique_ptr< QSslConfiguration > sslConfiguration
void sentUploadDataSlot(qint64, qint64)
void replyPreSharedKeyAuthenticationRequiredSlot(QSslPreSharedKeyAuthenticator *)
void postRequest(const QNetworkRequest &newHttpRequest)
void _q_cacheLoadReadyRead()
void _q_transferTimedOut()
QList< QSslError > pendingIgnoreSslErrorsList
bool isHttpRedirectResponse() const
QIODevice * cacheSaveDevice
static QHttpNetworkRequest::Priority convert(QNetworkRequest::Priority prio)
qint64 readData(char *, qint64) override
Reads up to maxSize bytes from the device into data, and returns the number of bytes read or -1 if an...
void readBufferFreed(qint64 size)
void setSslConfigurationImplementation(const QSslConfiguration &configuration) override
void readBufferSizeChanged(qint64 size)
void abort() override
Aborts the operation immediately and closes any network connections still open.
void close() override
Closes this device for reading.
void haveUploadData(const qint64 pos, const QByteArray &dataArray, bool dataAtEnd, qint64 dataSize)
qint64 size() const override
For open random-access devices, this function returns the size of the device.
virtual ~QNetworkReplyHttpImpl()
void startHttpRequestSynchronously()
void void void void void void void void void void void void void void void void void void void void void void void void void followRedirect()) protected void ignoreSslErrorsImplementation(const QList< QSslError > &errors) override
void sslConfigurationImplementation(QSslConfiguration &configuration) const override
qint64 bytesAvailable() const override
Returns the number of bytes that are available for reading.
bool isSequential() const override
bool canReadLine() const override
Returns true if a complete line of data can be read from the device; otherwise returns false.
void setReadBufferSize(qint64 size) override
Sets the size of the read buffer to be size bytes.
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
static QByteArray cacheControlName()
static constexpr QLatin1StringView locationHeader() noexcept
static auto remapCustom(QNetworkAccessManager::Operation operation, const QNetworkRequest &req)
static auto caseInsensitiveCompare(QByteArrayView value)
static QByteArray rangeName()
static bool isHopByHop(QByteArrayView header)
static constexpr QByteArrayView bytesEqualPrefix() noexcept
static QHash< QByteArray, QByteArray > parseHttpOptionHeader(QByteArrayView header)