diff options
| author | Mårten Nordheim <[email protected]> | 2018-08-16 16:09:55 +0200 |
|---|---|---|
| committer | Mårten Nordheim <[email protected]> | 2021-05-20 20:31:05 +0200 |
| commit | 55feb0d08a1c0ffc8721cbfd3defa359bc593358 (patch) | |
| tree | 94c6e928abb2f655d8554661e521defcb689f2b8 /src/network/access/qhttpnetworkreply.cpp | |
| parent | 5a701f5a7ea435096836afe01905bf8c13c465e3 (diff) | |
QHttpNetworkConnectionChannel: remove *authMethod
We store the authenticator right alongside it, which knows the
method.
The biggest change from this is changing a, self-proclaimed, duplicate
method from QHttpNetworkReply. Finding the method name ahead-of-time
is not actually needed, all we need to know is that a supported
authentication method is requested. Also moved that specific
functionality to a more logical location: QAuthenticatorPrivate.
Change-Id: I11627803ccb42b8ec33a28ef1d1e00bf60dc6da9
Reviewed-by: Edward Welbourne <[email protected]>
Reviewed-by: Timur Pocheptsov <[email protected]>
Diffstat (limited to 'src/network/access/qhttpnetworkreply.cpp')
| -rw-r--r-- | src/network/access/qhttpnetworkreply.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp index 29aef593690..76c16335ca6 100644 --- a/src/network/access/qhttpnetworkreply.cpp +++ b/src/network/access/qhttpnetworkreply.cpp @@ -411,31 +411,6 @@ bool QHttpNetworkReplyPrivate::findChallenge(bool forProxy, QByteArray &challeng return !challenge.isEmpty(); } -QAuthenticatorPrivate::Method QHttpNetworkReplyPrivate::authenticationMethod(bool isProxy) const -{ - // The logic is same as the one used in void QAuthenticatorPrivate::parseHttpResponse() - QAuthenticatorPrivate::Method method = QAuthenticatorPrivate::None; - QByteArray header = isProxy ? "proxy-authenticate" : "www-authenticate"; - QList<QByteArray> challenges = headerFieldValues(header); - for (int i = 0; i<challenges.size(); i++) { - QByteArray line = challenges.at(i).trimmed().toLower(); - if (method < QAuthenticatorPrivate::Basic - && line.startsWith("basic")) { - method = QAuthenticatorPrivate::Basic; - } else if (method < QAuthenticatorPrivate::Ntlm - && line.startsWith("ntlm")) { - method = QAuthenticatorPrivate::Ntlm; - } else if (method < QAuthenticatorPrivate::DigestMd5 - && line.startsWith("digest")) { - method = QAuthenticatorPrivate::DigestMd5; - } else if (method < QAuthenticatorPrivate::Negotiate - && line.startsWith("negotiate")) { - method = QAuthenticatorPrivate::Negotiate; - } - } - return method; -} - qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket) { if (fragment.isEmpty()) { |
