summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/access/qhttpnetworkconnection.cpp')
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 73510e6bef..18134dda13 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -584,32 +584,32 @@ void QHttpNetworkConnectionPrivate::createAuthorization(QAbstractSocket *socket,
{
Q_ASSERT(socket);
- int i = indexOf(socket);
+ QHttpNetworkConnectionChannel &channel = channels[indexOf(socket)];
- QAuthenticator *authenticator = &channels[i].authenticator;
+ QAuthenticator *authenticator = &channel.authenticator;
QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(*authenticator);
// Send "Authorization" header, but not if it's NTLM and the socket is already authenticated.
if (priv && priv->method != QAuthenticatorPrivate::None) {
if ((priv->method != QAuthenticatorPrivate::Ntlm
&& request.headerField("Authorization").isEmpty())
- || channels[i].lastStatus == 401) {
+ || channel.lastStatus == 401) {
QByteArray response = priv->calculateResponse(request.methodName(), request.uri(false),
request.url().host());
request.setHeaderField("Authorization", response);
- channels[i].authenticationCredentialsSent = true;
+ channel.authenticationCredentialsSent = true;
}
}
#if QT_CONFIG(networkproxy)
- authenticator = &channels[i].proxyAuthenticator;
+ authenticator = &channel.proxyAuthenticator;
priv = QAuthenticatorPrivate::getPrivate(*authenticator);
// Send "Proxy-Authorization" header, but not if it's NTLM and the socket is already authenticated.
if (priv && priv->method != QAuthenticatorPrivate::None) {
- if (priv->method != QAuthenticatorPrivate::Ntlm || channels[i].lastStatus == 407) {
+ if (priv->method != QAuthenticatorPrivate::Ntlm || channel.lastStatus == 407) {
QByteArray response = priv->calculateResponse(request.methodName(), request.uri(false),
networkProxy.hostName());
request.setHeaderField("Proxy-Authorization", response);
- channels[i].proxyCredentialsSent = true;
+ channel.proxyCredentialsSent = true;
}
}
#endif // QT_CONFIG(networkproxy)