2820 #if defined(QHTTP_DEBUG) 2832 if (statusCode == 401 || statusCode == 407) {
2834 #ifndef QT_NO_NETWORKPROXY 2845 #ifndef QT_NO_NETWORKPROXY 2846 if (statusCode == 407)
2847 emit q->proxyAuthenticationRequired(
proxy, auth);
2861 #ifndef QT_NO_NETWORKPROXY 2862 if (statusCode == 407)
2922 bool everythingRead =
false;
2924 if (q->currentRequest().method() ==
QLatin1String(
"HEAD") ||
2932 everythingRead =
true;
2967 everythingRead =
true;
2987 arr->
resize(oldArrSize + toRead);
2989 arr->
resize(oldArrSize + read);
2997 if (tmp[0] !=
'\r' || tmp[1] !=
'\n') {
3020 everythingRead =
true;
3035 if (bytesWritten == -1 || bytesWritten < n) {
3039 #if defined(QHTTP_DEBUG) 3040 qDebug(
"QHttp::_q_slotReadyRead(): read %lld bytes (%lld bytes done)", n,
bytesDone);
3049 memcpy(ptr, arr->
data(), arr->
size());
3052 #if defined(QHTTP_DEBUG) 3053 qDebug(
"QHttp::_q_slotReadyRead(): read %lld bytes (%lld bytes done)", n,
bytesDone + q->bytesAvailable());
3058 emit q->dataReadProgress(
bytesDone + q->bytesAvailable(), 0);
3066 if (everythingRead) {
QBool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QAuthenticator authenticator
bool blockSignals(bool b)
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke...
State
This enum is used to specify the state the client is in:
QHttpResponseHeader response
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
char * data()
Returns a pointer to the data stored in the byte array.
qint64 bytesAvailable() const
Returns the number of incoming bytes that are waiting to be read.
int toInt(bool *ok=0, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
void parseHttpResponse(const QHttpResponseHeader &, bool isProxy)
The QByteArray class provides an array of bytes.
#define QT_TRANSLATE_NOOP(scope, x)
Marks the string literal sourceText for dynamic translation in the given context; i...
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
static QAuthenticatorPrivate * getPrivate(QAuthenticator &auth)
qint64 read(char *data, qint64 maxlen)
Reads at most maxSize bytes from the device into data, and returns the number of bytes read...
Q_CORE_EXPORT void qDebug(const char *,...)
void _q_slotSendRequest()
char * reserve(int bytes)
void truncate(int pos)
Truncates the string at the given position index.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
const T * ptr(const T &t)
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
void close()
Closes the I/O device for the socket, disconnects the socket's connection with the host...
The QAuthenticator class provides an authentication object.
const char * constData() const
Returns a pointer to the data stored in the byte array.
void finishedWithError(const QString &detail, int errorCode)
The QHttp class provides an implementation of the HTTP protocol.
qint64 readLine(char *data, qint64 maxlen)
This function reads a line of ASCII characters from the device, up to a maximum of maxSize - 1 bytes...
bool isNull() const
Returns true if the authenticator is null.
QString toLower() const Q_REQUIRED_RESULT
Returns a lowercase copy of the string.
void resize(int size)
Sets the size of the byte array to size bytes.
QByteArray readAll()
Reads all available data from the device, and returns it as a QByteArray.
int size() const
Returns the number of bytes in this byte array.
QTimer post100ContinueTimer
qint64 write(const char *data, qint64 len)
Writes at most maxSize bytes of data from data to the device.
QAuthenticator proxyAuthenticator
static const KeyPair *const end
void stop()
Stops the timer.
bool canReadLine() const
Returns true if a line of data can be read from the socket; otherwise returns false.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
void clear()
Clears the contents of the byte array and makes it empty.