[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Java and auto-proxy doesn't work
From:       Till Krech <till () snafu ! de>
Date:       2002-06-25 22:58:59
[Download RAW message or body]

On Tuesday 25 June 2002 12:13, Michael Goffioul wrote:
> It seems java doesn't get the proxy settings when using an auto-proxy
> script. It works OK with proxy manual settings. In first case, the
> java console tells me "Proxy :0" and in the second case
> "Proxy proxyserv:3182". Looking at kjavaappletserver.cpp, it seems
> the code is using KProtocolManager::proxyFor() which doesn't take
> auto-proxy into account. Any solution to that?
Yes and no. The method proxyForURL(KURL url) could be used which seems to 
respect the pac file settings. But unfortunately, the proxy setting is system 
wide in java. It is difficult to change during runtime because all applets 
are executed by the same virtual machine and if you load an applet e.g. from 
localhost (no proxy) and another one e.g. from http://java.sun.com (proxy 
proxyserv:3182), things will go wrong. One applet may still be busy loading 
resources while the other one wants to load its classes from a different URL. 
So, there is currently no clean solution for this.
My idea is though to provide java protocol handlers (little wrappers) for 
http:, https:, ftp:, fish: etc. which forward the requests to the 
KJavaDownloader (kde c++ world), which could then handle everything correctly 
- including proxy settings - and cookies. 
Look here for more informations on this topic:
http://developer.java.sun.com/developer/onlineTraining/protocolhandlers/
Although I already started experimenting with it, I haven't yet got something 
really working. It's all a bit tricky if you do not want to reimplement the 
whole protocols. If anyone has made experiences in java implemeting own 
protocol handlers or, what we need here, overloading/redirecting existing 
ones, he/she is welcome to help. 

greetings, till
>
> Michael.

-- 
SuSE Linux 8.0 (i386) 2.4.18-64GB-SMP
KDE: 3.0.5 (CVS HEAD >= 20020427)
Qt: 3.0.4


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic