Commit 57d234aa authored by Joris Guisson's avatar Joris Guisson
Browse files

Make sure http post works properly in search plugin. This fixes the not being...

Make sure http post works properly in search plugin. This fixes the not being able to login to a website bug.

BUG: 194037

svn path=/branches/stable/extragear-kde4/network/ktorrent/; revision=975832
parent f1df0ea6
......@@ -18,6 +18,7 @@ Changes in 3.2.2 :
- Fix crash at exit caused by stopping torrent in it's destructor (193585)
- No longer check if a torrent has to have an announce or a nodes key
- Added experimental option which replaces KIO to announce with a QHttp based solution, this fixes connection to host broken errors
- Make sure http post works properly in search plugin (194037)
Changes in 3.2.1 :
- Resort torrents if display name is changed
......
......@@ -44,7 +44,7 @@ namespace kt
setPluginsEnabled(false);
setStatusMessagesEnabled(false);
KParts::BrowserExtension* ext = this->browserExtension();
connect(ext,SIGNAL(openUrlRequest(const KUrl &, const KParts::OpenUrlArguments &, const KParts::BrowserArguments &)),
connect(ext,SIGNAL(openUrlRequestDelayed(const KUrl &, const KParts::OpenUrlArguments &, const KParts::BrowserArguments &)),
this,SLOT(openUrlRequest(const KUrl&,const KParts::OpenUrlArguments & , const KParts::BrowserArguments &)));
ext->enableAction("copy",true);
......@@ -67,15 +67,23 @@ namespace kt
void HTMLPart::openUrlRequest(const KUrl &u, const KParts::OpenUrlArguments & arg, const KParts::BrowserArguments & barg)
{
Q_UNUSED(arg);
Q_UNUSED(barg);
if (active_job)
{
active_job->kill();
active_job = 0;
}
KIO::TransferJob* j = KIO::get(u, KIO::NoReload, KIO::HideProgressInfo);
KIO::TransferJob* j = 0;
if (barg.doPost())
{
j = KIO::http_post(u,barg.postData,KIO::HideProgressInfo);
j->addMetaData("content-type",barg.contentType());
}
else
{
j = KIO::get(u, KIO::NoReload, KIO::HideProgressInfo);
}
connect(j,SIGNAL(data(KIO::Job*,const QByteArray &)),
this,SLOT(dataReceived(KIO::Job*, const QByteArray& )));
connect(j,SIGNAL(result(KJob*)),this,SLOT(jobDone(KJob* )));
......
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