summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Wilde <lukew@serenityos.org>2022-12-30 22:29:26 +0000
committerAndreas Kling <kling@serenityos.org>2022-12-30 23:52:09 +0100
commitb85f4ab66a4e7ecc08a5e84083f5ae877b43b1b7 (patch)
tree2253f1f9a92e09dc6f4dcca3de082cdd45be19a6
parente598f22768aa281dbf1f907f652472b3bc088271 (diff)
downloadserenity-b85f4ab66a4e7ecc08a5e84083f5ae877b43b1b7.zip
Ladybird: Tell Qt that we manually handle the Cookie header
In some cases, Qt would silently drop the Cookie header and start causing Cookie authenticated requests to start failing.
-rw-r--r--Ladybird/RequestManagerQt.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Ladybird/RequestManagerQt.cpp b/Ladybird/RequestManagerQt.cpp
index fe0f2016a1..11c2c47d55 100644
--- a/Ladybird/RequestManagerQt.cpp
+++ b/Ladybird/RequestManagerQt.cpp
@@ -41,6 +41,8 @@ ErrorOr<NonnullRefPtr<RequestManagerQt::Request>> RequestManagerQt::Request::cre
QNetworkRequest request { QString(url.to_deprecated_string().characters()) };
request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::ManualRedirectPolicy);
request.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
+ request.setAttribute(QNetworkRequest::CookieLoadControlAttribute, QNetworkRequest::Manual);
+ request.setAttribute(QNetworkRequest::CookieSaveControlAttribute, QNetworkRequest::Manual);
// NOTE: We disable HTTP2 as it's significantly slower (up to 5x, possibly more)
request.setAttribute(QNetworkRequest::Http2AllowedAttribute, false);