Bug 64825 - only the first of FindProxyForURL()'s results is honored
Summary: only the first of FindProxyForURL()'s results is honored
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Unmaintained
Component: http (show other bugs)
Version: 4.0
Platform: Compiled Sources FreeBSD
: NOR wishlist
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
: 118854 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-23 19:26 UTC by mi+kde
Modified: 2011-10-18 07:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mi+kde 2003-09-23 19:26:44 UTC
Version:           4.0 (using KDE 3.1.3)
Installed from:    compiled sources
Compiler:          gcc version 3.3.1 [FreeBSD]
OS:          FreeBSD (i386) release 5.1-CURRENT

Sometimes our quick and direct Internet connection goes down and I'd like to switch to the alternative one, which is using a proxy. My FindProxyForURL() returns

	"DIRECT; PROXY 172.21.17.206:3128"

Unfortunately, when the direct link is unavailable, Konqueror (or is it the kio_*?)
does not automaticly try the proxy -- I have to edit and reload the proxy file to return

	"PROXY 172.21.17.206:3128; DIRECT"

The http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html

contains the original specification of the FindProxyForURL(). It only has examples for lists of proxies, but the behaviour I'd expect logicly follows from the specification.
Comment 1 Thiago Macieira 2003-09-24 00:22:28 UTC
If it's direct, it's not by proxy. I don't think the code was written to do what you are asking 
of it, so I don't think it will ever work. I'll leave for someone else to make a final word on 
this, but I can already tell you that: 
 
1) this is probably a "wishlist", since the feature is not implemented 
2) it will probably be closed as WONTFIX 
Comment 2 mi+kde 2003-09-24 07:35:33 UTC
I frivolously suspect, that even the list, which contains multiple proxies would not work as 
expected, but I have not tested this. 
Comment 3 Waldo Bastian 2003-10-15 14:40:46 UTC
Multiple proxy hosts are not supported at the moment, likewise multiple hosts (IPs) for a single hostname are not supported either. In both cases only the first one is tried.

Changed to wishlist. Probably useful to implement after KDE 3.2
Comment 4 mi+kde 2004-09-03 16:28:16 UTC
3.3 is out and this feature is still not in :-( Nobody is even looking at wish-list items, I suspect.

I'd like to be able to add another possible result to the FindProxyForURL(): "REJECT". This way all sorts of censorship can be implemented -- such as ad-blocking -- without adding advertisers' servers to the /etc/hosts:

function FindProxyForURL(url, host)
{
       if (isPlainHostName(host))
                 return "DIRECT";
       if (shExpMatch(url, "*advert*")
                 return "REJECT";
       return "PROXY 10.0.2.100:2880; PROXY 10.0.3.100; DIRECT";
}
Comment 5 Jonathan Marten 2008-01-15 11:23:10 UTC
*** Bug 118854 has been marked as a duplicate of this bug. ***
Comment 6 Dawit Alemayehu 2011-04-25 21:14:00 UTC
This will probably be fixed for KDE 4.7. I have already committed one half portion of the code that would make this possible. The other more important half is still pending and hopeful will be committed before 4.7 release. See the url below for details:

https://git.reviewboard.kde.org/r/101037/
Comment 7 Dawit Alemayehu 2011-10-18 07:08:21 UTC
See comment #6.