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.
This commit is contained in:
Luke Wilde 2022-12-30 22:29:26 +00:00 committed by Andreas Kling
parent e598f22768
commit b85f4ab66a
Notes: sideshowbarker 2024-07-17 02:25:01 +09:00

View file

@ -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);