Commit abb0115b authored by Harald Sitter's avatar Harald Sitter
Browse files

disable automatic cookie injection

the http slave reads the cookie metadata and defaults to auto, which would
try to find applicable cookies in the cookiejar and inject it into every
request. this is problematic because that cookie is not from drkonqi but
rather some other software (e.g. konqueror). as such the cookie is entirely
useless for us but gets in the way when bugzilla finds the cookie to be
unacceptable for whatever reason (outdated,invalid,unexpected).

force all apijobs to disable cookies entirely. we have no use for them.

BUG: 419646
FIXED-IN: 5.18.5
parent a96d4878
...@@ -40,6 +40,10 @@ TransferAPIJob::TransferAPIJob(KIO::TransferJob *transferJob, QObject *parent) ...@@ -40,6 +40,10 @@ TransferAPIJob::TransferAPIJob(KIO::TransferJob *transferJob, QObject *parent)
addMetaData(QStringLiteral("UserAgent"), QStringLiteral("DrKonqi")); addMetaData(QStringLiteral("UserAgent"), QStringLiteral("DrKonqi"));
// We don't want HTML blobs but proper job errors + text! // We don't want HTML blobs but proper job errors + text!
addMetaData(QStringLiteral("errorPage"), QStringLiteral("false")); addMetaData(QStringLiteral("errorPage"), QStringLiteral("false"));
// Disable automatic cookie injection. We don't need cookies but they
// can mess up requests (supposedly by being unexpected or invalid or outdated ...)
addMetaData(QStringLiteral("cookies"), QStringLiteral("none"));
connect(m_transferJob, &KIO::TransferJob::data, connect(m_transferJob, &KIO::TransferJob::data,
this, [this](KIO::Job *, const QByteArray &data) { this, [this](KIO::Job *, const QByteArray &data) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment