HTTP ioslave keeping POST data when it shouldn't

Best, Jan-Pascal van j.p.vanbest at tbm.tudelft.nl
Tue Jun 11 13:25:37 BST 2002


Hi all,

I've been noticing some weird behaviour and I think I know what's going
on.
When I start a search job like this:
  QString sql = "SELECT...";
  KIO::DavJob* job = KIO::davSearch( baseURL, "DAV:", "sql", sql, false
);
  KIO::Scheduler::scheduleJob(job);
  connect(job, SIGNAL(result( KIO::Job * )), this,
SLOT(slotResult(KIO::Job *)));
everything works as expected. But when I next start another search,
using the same
code but with another SQL query, the original query is sent to the
server!

My theory is the following:
When the second search job is scheduled, the scheduler reuses the http
ioslave
from the previous search. This slave still has the original data in 
m_bufPOST, so it doesn't ask for more data using the dataReq() signal
and
sends the old (wrong) query. This is supported by the debug output: 
the first time I see
   kio_http_debug: (15243) POST'ing live data...
and the next time
   kio_http_debug: (15239) POST'ing saved data...

Can anyone confirm this is happening? I assume this behaviour is
intended in a
way for reposts after authentication or after redirections, but in this
case it's 
rather unexpected. What can I do to prevent this? I don't want to skip
on the scheduler,
since I may be starting hundreds of these at a time.

Cheers

Jan-Pascal

-- 
Jan-Pascal van Best
Delft University of Technology
http://www.tbm.tudelft.nl/webstaf/janb/index.htm 




More information about the kfm-devel mailing list