[Bug 176093] New: kio_http process reuse sends requests to wrong server
makosoft at googlemail.com
makosoft at googlemail.com
Tue Nov 25 21:55:40 CET 2008
http://bugs.kde.org/show_bug.cgi?id=176093
Summary: kio_http process reuse sends requests to wrong server
Product: kio
Version: 4.1
Platform: Compiled Sources
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: http
AssignedTo: kdelibs-bugs at kde.org
ReportedBy: makosoft at googlemail.com
Version: (using Devel)
Compiler: gcc (Gentoo 4.3.2 p1.1) 4.3.2
OS: Linux
Installed from: Compiled sources
There appears to be an issue whereby, under certain circumstances, a reused
kio_http process will incorrectly send a subsequent request intended for a
different server to the same server as a previous request.
Specifically, if it receives a request for a URL on foo.com that's a cache
miss, it connects to foo.com and sets m_prevRequest to the information in that
request.
If it then receives a subsequent request for a URL on bar.com that's satisfied
from cache, m_prevRequest is updated with this URL (in
HTTPProtocol::proceedUntilResponseHeader) but it doesn't call
httpCloseConnection to disconnect from foo.com (since HTTPProtocol::sendQuery
returns early before this is done.)
If its next request is for a non-cached URL on bar.com, this is then sent to
foo.com. Since the request's host matches that in m_prevRequest (bar.com),
HTTPProtocol::httpShouldCloseConnection returns false and we use the same
IP/port (and possibly, though not always, the same connection) as the last
request sent, which was to foo.com.
This can be reproduced (usually) by going to
http://www.battech.co.uk/shop/control/category/~category_id=BAT_LAPTOP_ACER/~VIEW_SIZE=12/~VIEW_INDEX=3?&pageno=3
and going repeatedly between pages 1, 2, and 3. If done with no other pages
open, you should eventually get a 404 message from Google. (This probably won't
work if you're using a proxy, since connection reuse works differently then.
Also, cache must be enabled.)
(The reason the test case works is that the images are cached files from
www.battech.co.uk, but the page itself and a tracking GIF from
www.google-analytics.com are uncached. As a result, the request for the page
ends up going to www.google-analytics.com some of the time due to this bug,
depending on which kio_http process is used for what.)
--
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Kdelibs-bugs
mailing list