From bb1ad6e425bf758ddaa974adb14e9b8389037611 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Thu, 20 Aug 2020 17:57:25 +0200 Subject: Adapt to QNetworkRequest change In d12afeff4097dd78f1311511e0c8f74e1a810d47 the default for redirection handling was changed from manual to NoLessSafeRedirectPolicy. This makes the redirection handling asynchronous, leading to a failure in tst_qqmlxmlhttprequest::redirects. In it the request is not finished after component.completeCreate(). Thus the property dataOK is read before being set to true, and the test fails. This change reestablishes the ManualRedirectPolicy, giving the old behavior, and fixes a failure blocking CI. Change-Id: I525b1229b4ce8cfb814bdb66f86f745ea05c1b5c Reviewed-by: Fabian Kosmale --- src/qml/qml/qqmlxmlhttprequest.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/qml/qml/qqmlxmlhttprequest.cpp') diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index aeb57a7768..7a2f6f4537 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -1217,6 +1217,7 @@ void QQmlXMLHttpRequest::requestFromUrl(const QUrl &url) } } + request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::ManualRedirectPolicy); request.setUrl(url); if(m_method == QLatin1String("POST") || m_method == QLatin1String("PUT")) { -- cgit v1.2.3