KIO
accessmanager.cpp
Go to the documentation of this file.
55 static QNetworkRequest::Attribute gSynchronousNetworkRequestAttribute = QNetworkRequest::SynchronousRequestAttribute;
57 static QNetworkRequest::Attribute gSynchronousNetworkRequestAttribute = static_cast<QNetworkRequest::Attribute>(QNetworkRequest::HttpPipeliningWasUsedAttribute + 7);
213 QNetworkReply *AccessManager::createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData)
221 return new KDEPrivate::AccessManagerReply(op, req, QNetworkReply::ContentAccessDenied, i18n("Blocked request."), this);
289 //kDebug(7044) << "CustomOperation:" << reqUrl << "method:" << method << "outgoing data:" << outgoingData;
292 return new KDEPrivate::AccessManagerReply(op, req, QNetworkReply::ProtocolUnknownError, i18n("Unknown HTTP verb."), this);
346 reply = new KDEPrivate::AccessManagerReply(op, req, QNetworkReply::UnknownNetworkError, kioJob->errorText(), this);
373 reply = new KDEPrivate::AccessManagerReply(op, req, kioJob, d->emitReadyReadOnMetaDataChange, this);
385 void AccessManager::AccessManagerPrivate::setMetaDataForRequest(QNetworkRequest request, KIO::MetaData& metaData)
424 if (request.attribute(QNetworkRequest::AuthenticationReuseAttribute) == QNetworkRequest::Manual) {
478 bool KIO::Integration::sslConfigFromMetaData(const KIO::MetaData& metadata, QSslConfiguration& sslconfig)
483 const QSsl::SslProtocol sslProto = qSslProtocolFromString(metadata.value(QL1S("ssl_protocol_version")));
486 sslconfig.setCaCertificates(QSslCertificate::fromData(metadata.value(QL1S("ssl_peer_chain")).toUtf8()));
524 QDBusReply<QString> reply = kcookiejar.call("findDOMCookies", url.toString(QUrl::RemoveUserInfo), (qlonglong)d->windowId);
560 kcookiejar.call("addCookies", url.toString(QUrl::RemoveUserInfo), cookieHeader, (qlonglong)d->windowId);
579 KConfigGroup cfg = KSharedConfig::openConfig("kcookiejarrc", KConfig::NoGlobals)->group("Cookie Policy");
static bool isLocalRequest(const KUrl &url)
virtual void setWindow(QWidget *window)
Associate this job with a window given by window.
Definition: jobuidelegate.cpp:58
qlonglong toLongLong(bool *ok) const
QString i18n(const char *text)
void setEmitReadyReadOnMetaDataChange(bool)
Sets the network reply object to emit readyRead when it receives meta data.
Definition: accessmanager.cpp:208
virtual QNetworkReply * createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData)
QByteArray toByteArray() const
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
TransferJob * put(const KUrl &url, int permissions, JobFlags flags=DefaultFlags)
Put (a.k.a.
Definition: job.cpp:1700
const char header[]
bool contains(const Key &key) const
static qint64 sizeFromRequest(const QNetworkRequest &req)
Definition: accessmanager.cpp:63
void setMetaData(const KIO::MetaData &metaData)
Set meta data to be sent to the slave, replacing existing meta data.
Definition: job.cpp:258
QList< QByteArray > rawHeaderList() const
QWidget * window() const
QVariant header(KnownHeaders header) const
static void setJobPriority(SimpleJob *job, int priority)
Changes the priority of job; jobs of the same priority run in the order in which they were created...
Definition: scheduler.cpp:805
bool isValid() const
bool hasRawHeader(const QByteArray &headerName) const
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
MimetypeJob * mimetype(const KUrl &url, JobFlags flags=DefaultFlags)
Find mimetype for one file or directory.
Definition: job.cpp:1856
QByteArray rawHeader(const QByteArray &headerName) const
void setProtocol(QSsl::SslProtocol protocol)
void setIgnoreContentDisposition(bool on)
bool isEmpty() const
TransferJob * get(const KUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
Get (a.k.a.
Definition: job.cpp:1369
static bool synchronousRun(Job *job, QWidget *window, QByteArray *data=0, KUrl *finalURL=0, QMap< QString, QString > *metaData=0)
This function executes a job in a synchronous way.
Definition: netaccess.cpp:276
StatJob * stat(const KUrl &url, JobFlags flags=DefaultFlags)
Find all details for one file or directory.
Definition: job.cpp:924
bool isNull() const
void setCiphers(const QList< QSslCipher > &ciphers)
KConfigGroup group(const QByteArray &group)
bool isValid() const
QWidget * window() const
Returns the window associated with this network access manager.
Definition: accessmanager.cpp:183
A KDE implementation of QNetworkCookieJar.
Definition: accessmanager.h:278
QString join(const QString &separator) const
int length() const
void clear()
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void setExternalContentAllowed(bool allowed)
Set allowed to false if you don't want any external content to be fetched.
Definition: accessmanager.cpp:127
QString toString(QFlags< QUrl::FormattingOption > options) const
Used for KIO::AccessManager; KDE implementation of QNetworkReply.
Definition: accessmanagerreply_p.h:48
void reparseConfiguration()
Reparse the KDE cookiejar configuration file.
Definition: accessmanager.cpp:577
QDBusMessage call(const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
Priority priority() const
const char * name() const
void setCaCertificates(const QList< QSslCertificate > &certificates)
KIO::MetaData & requestMetaData()
Returns a reference to the temporary meta data container.
Definition: accessmanager.cpp:188
void putOnHold()
void setExpirationDate(const QDateTime &date)
void setCookieJarWindowId(WId id)
Sets the cookiejar's window id to id.
Definition: accessmanager.cpp:138
Type value() const
void setRedirectionHandlingEnabled(bool handle)
Set handle to false to prevent the internal handling of redirections.
Definition: job.cpp:369
bool isEmpty() const
static QSsl::SslProtocol qSslProtocolFromString(const QString &str)
Definition: accessmanager.cpp:461
QVariant attribute(Attribute code, const QVariant &defaultValue) const
bool isSessionCookie() const
CookieJar(QObject *parent=0)
Constructs a KNetworkCookieJar with parent parent.
Definition: accessmanager.cpp:495
QList< QSslCertificate > fromData(const QByteArray &data, QSsl::EncodingFormat format)
bool isWindow() const
QString right(int n) const
virtual QNetworkReply * createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData=0)
Reimplemented for internal reasons, the API is not affected.
Definition: accessmanager.cpp:213
QUrl url() const
static QNetworkRequest::Attribute gSynchronousNetworkRequestAttribute
Definition: accessmanager.cpp:57
KGuiItem ok()
QByteArray toRawForm(RawForm form) const
bool setCookiesFromUrl(const QList< QNetworkCookie > &cookieList, const QUrl &url)
Reimplemented for internal reasons, the API is not affected.
Definition: accessmanager.cpp:544
QList< QNetworkCookie > cookiesForUrl(const QUrl &url) const
Reimplemented for internal reasons, the API is not affected.
Definition: accessmanager.cpp:516
static void putReplyOnHold(QNetworkReply *reply)
Puts the ioslave associated with the given reply on hold.
Definition: accessmanager.cpp:198
bool isExternalContentAllowed() const
Returns true if external content is going to be fetched.
Definition: accessmanager.cpp:132
void setCookieJar(QNetworkCookieJar *cookieJar)
QMap< QString, QVariant > toMap() const
TransferJob * http_post(const KUrl &url, const QByteArray &postData, JobFlags flags=DefaultFlags)
HTTP POST (for form data).
Definition: job.cpp:1597
KIO::MetaData & sessionMetaData()
Returns a reference to the persistent meta data container.
Definition: accessmanager.cpp:193
QString errorString() const
Converts an error code and a non-i18n error message into an error message in the current language...
Definition: global.cpp:159
void setWindow(QWidget *widget)
Sets the window associated with this network access manager.
Definition: accessmanager.cpp:154
TransferJob * http_delete(const KUrl &url, JobFlags flags=DefaultFlags)
HTTP DELETE.
Definition: job.cpp:1637
void setRawHeader(const QByteArray &headerName, const QByteArray &headerValue)
QWidget * find(WId id)
Definition: job.h:29
int length() const
bool toBool() const
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QString left(int n) const
bool isValid() const
iterator insert(const Key &key, const T &value)
bool isCookieStorageDisabled() const
Returns true if persistent caching of cookies is disabled.
Definition: accessmanager.cpp:511
QNetworkCookieJar * cookieJar() const
bool sslConfigFromMetaData(const KIO::MetaData &metadata, QSslConfiguration &sslconfig)
Maps KIO SSL meta data into the given QSslConfiguration object.
Definition: accessmanager.cpp:478
QDBusError lastError() const
Type type() const
int compare(const QString &other) const
QString toString() const
T readEntry(const QString &key, const T &aDefault) const
QString errorText() const
void setDisableCookieStorage(bool disable)
Prevent persistent storage of cookies.
Definition: accessmanager.cpp:567
const T value(const Key &key) const
int remove(const Key &key)
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.