OAuth over XMLHttpRequest fails
We currently always generate our own Authorization header, which overrides any Authorization headers set the by user application. Change-Id: I3b11c8dd0bc708e795ff697262a383ce28cae2f3 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
This commit is contained in:
parent
663c5186e8
commit
a23ff58d71
@ -507,7 +507,7 @@ void QHttpNetworkConnectionPrivate::createAuthorization(QAbstractSocket *socket,
|
||||
|
||||
// Send "Authorization" header, but not if it's NTLM and the socket is already authenticated.
|
||||
if (channels[i].authMethod != QAuthenticatorPrivate::None) {
|
||||
if (!(channels[i].authMethod == QAuthenticatorPrivate::Ntlm && channels[i].lastStatus != 401)) {
|
||||
if ((channels[i].authMethod != QAuthenticatorPrivate::Ntlm && request.headerField("Authorization").isEmpty()) || channels[i].lastStatus == 401) {
|
||||
QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(channels[i].authenticator);
|
||||
if (priv && priv->method != QAuthenticatorPrivate::None) {
|
||||
QByteArray response = priv->calculateResponse(request.d->methodName(), request.d->uri(false));
|
||||
|
Loading…
Reference in New Issue
Block a user