The software update functionality appears to have some problems with, at least, my proxy.
Attached is the stack trace which 'Test Connection' in Preferences produces.
Proxy has been defined with server and port. No authentication required.
The Squirrel log also contains these lines:
2009-03-10 10:44:31,219 [AWT-EventQueue-1] INFO org.apache.commons.httpclient.auth.AuthChallengeProcessor - ntlm authentication scheme selected
2009-03-10 10:44:31,219 [AWT-EventQueue-1] INFO org.apache.commons.httpclient.HttpMethodDirector - No credentials available for NTLM <any realm>@proxy.dom.cc:80
2009-03-10 10:44:31,219 [AWT-EventQueue-1] ERROR net.sourceforge.squirrel_sql.fw.util.IOUtilitiesImpl - downloadHttpFile: Unexpected exception while attempting to open an HTTP connection to url (http://www.squirrel-sql.net/updates/stable/release.xml) to download a file (C:\Program Files\SQuirreL SQL Client\update\downloads\release.xml): Failed to download file from url (http://www.squirrel-sql.net/updates/stable/release.xml): HTTP Response Code=407
where proxy.dom.cc is the actual proxy server.
If it is of any help, the following piece of code can get through the proxy:
Proxy proxy=new Proxy\(Proxy.Type.HTTP, new InetSocketAddress\("proxy.dom.cc", 80\)\);
URL url=new URL\("http://dr.dk/"\);
URLConnection conn=url.openConnection\(proxy\);
System.out.println\("ok"\);
System.out.println\("Length: " + conn.getContentLength\(\)\);
BufferedReader in = new BufferedReader\(
new InputStreamReader\(
conn.getInputStream\(\)\)\);
String inputLine;
while \(\(inputLine = in.readLine\(\)\) \!= null\)
System.out.println\(inputLine\);
in.close\(\);
\} catch \(IOException e\) \{
// TODO Auto-generated catch block
e.printStackTrace\(\);
\}
Trace from Test Connection
Seems that this is still an issue in 3.2.
See attached log from SquirrelSql.
Using the above code with the proxy in question and url: http://www.squirrel-sql.net:80/updates/stable/release.xml return the file so it seems that it ought to work.
SquirrelSql trace
Hello,
We adopted HttpClient for our software update feature, so a solution that uses Java's (often broken) URLConnection is less than ideal. Can you tell me what proxy software you use? We are using HttpClient's support for proxies - I wonder if this is a known issue for HttpClient ?
Rob
Hi,
I believe the proxy servers are blue coat proxies.
Do you have a small program testing just proxying I could try?
Sad to say at the moment I do not. However, the code that uses HttpClient is in net.sourceforge.squirrel_sql.fw.util.IOUtilitiesImpl.downloadHttpFile(URL,Filewrapper, IProxySettings) if you want to have a look and maybe try to write a test driver yourself.
Rob