Bug 123121 - Konqueror sends (some) HTTP requests twice (seems related to ALT-F2 -> URL)
Summary: Konqueror sends (some) HTTP requests twice (seems related to ALT-F2 -> URL)
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: http (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
Depends on:
Reported: 2006-03-05 14:38 UTC by Daniel Hahler
Modified: 2011-04-18 03:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Hahler 2006-03-05 14:38:26 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Ubuntu Packages

I experience the same problem as with bug #62209:

When I request a php page it gets requested twice by Konqueror!

First, I've thought it would be related to using a proxy (local Privoxy 3.0.3-5 from ubuntu/debian), but it happens now also without it (and Firefox has no such problems through it).

Then I've thought it would be related to an "Expires" header, because with a direct connection (without proxy) it did not happen anymore, but I could force it somehow to happen again.

At least, I can say that it seems to be related to opening the URL through ALT-F2, but also from a link in KMail for example.

I've experienced this issue also with a link out of Konqueror, where it annoyed extremely, because I was generating some test image, which Konqueror requested twice also and caused the image to be different from what the according debug output said.

To reproduce it, a PHP script like this might work:
 * When accessing an URL through ALT-F2 it gets requested twice(!) - at least
 * that's the most reproducable way..

#header('Expires: Mon, 06 Mar 2006 05:00:00 GMT');
#       header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
#       header('Cache-Control: no-cache, must-revalidate');
#       header('Pragma: no-cache');

$fh = fopen( '/tmp/test.tmp', 'a' );
fwrite( $fh, time()."\n" );
Comment 1 Thiago Macieira 2006-03-06 15:10:39 UTC
Yes, it is accessed twice.

Are you sure that the page specified caching?

Didn't we have a mandatory caching of 60 seconds?
Comment 2 Nicolas Goutte 2006-03-06 16:56:47 UTC
To quote freely David Faure, the caching is done by KHTML, not by the HTTP KIO slave. (See the thread on the kde-core-devel mailing list, not so long ago.)
Comment 3 Maksim Orlovich 2006-03-06 17:20:00 UTC
That's clearly a misquote, David wouldn't be so wrong. Actually, there is caching in both.
Comment 4 Nicolas Goutte 2006-03-06 17:24:43 UTC
On Monday 06 March 2006 16:56, Nicolas Goutte wrote:
> ------- To quote freely David Faure, the caching is done by KHTML, not by
> the HTTP KIO slave. (See the thread on the kde-core-devel mailing list, not
> so long ago.)

I have found the thread again.

Unfortunately my quote was a little too freely. David only told that caching 
was only done when everything was downloaded.

The answer of David that I meant is here:

The whole thread is here:

Have a nice day!
Comment 5 Maksim Orlovich 2006-03-06 17:29:02 UTC
Note that the Alt-F2 path should work by placing slave on hold, and transferring it to konq, AFAIK. But may be I should shut up since I am not the one who will be doing the fixing, and the relevant people know this stuff better than me anyway
Comment 6 Daniel Hahler 2006-11-14 19:59:58 UTC
Changing to NEW, as it's confirmed also by others.
Comment 7 Dawit Alemayehu 2011-01-05 00:56:32 UTC
SVN commit 1211792 by adawit:

- Fixed KIO::SchedulerPrivate::heldSlaveFor to correctly reuse ioslaves that are on hold.
  See http://svn.reviewboard.kde.org/r/6271/ for details.


 M  +14 -3     scheduler.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=1211792
Comment 8 Dawit Alemayehu 2011-04-18 03:20:21 UTC
Git commit 5c65f468d016961e7e0bf877e56d475bc302f552 by Dawit Alemayehu.
Committed on 18/04/2011 at 03:23.
Pushed by adawit into branch 'KDE/4.6'.

Mostly revert the changes I made with commit d27c820581673040e80c46087b34b76e9fc9ed79.

I completely misunderstood the main concept behind put slave on hold. With the exception
of corner-case that can only be solved at the application level, putting slaves on hold
should work correctly once this partial revert is commited.


M  +7    -11   kio/kio/scheduler.cpp