Closed GoogleCodeExporter closed 8 years ago
It looks like the HTTP session management API's used by NetCDF-Java are
changing. They're currently migrating from HttpClient
(http://hc.apache.org/httpclient-3.x/index.html) to HttpComponents
(http://hc.apache.org/); the full details are at
http://www.unidata.ucar.edu/software/netcdf-java/reference/HTTPauthentication.ht
ml
Somewhere in the transition they've removed the setHttpClient method on
NetcdfDataset. I'm looking at the Thredds (i.e NetCDF java) source code, but I
can't find where they're managing the HTTP client anymore. I'll post a note to
the netcdf users list.
Original comment by bschlin...@gmail.com
on 15 Nov 2011 at 10:37
I posted the following to netcdf-java at unidata dot ucar dot edu:
"Hi All,
I used to be able to set a proxy for the network connections used by
NetCDF-Java with the following:
httpClient = org.apache.commons.httpclient.HttpClient();
httpClient.getHostConfiguration().setProxy(proxyname, port);
ucar.nc2.dataset.NetcdfDataset.setHttpClient(httpClient);
However, the setHttpClient method no longer exists. The docs I found about
this, at
http://www.unidata.ucar.edu/software/netcdf-java/reference/HTTPauthentication.ht
ml, basically say the same thing, i.e. use the setHttpClient method. What's the
current recommendation for setting a network proxy?
Thanks
--
Brian Schlining"
Original comment by bschlin...@gmail.com
on 15 Nov 2011 at 10:48
From ucar:
Brian-
I provided a fix that will go into
a minor release of 4.2; should be available
shortly.
Basically there will be two procedures
1. HTTPSession.setGlobalSimpleProxy(String host, int port)
This is a static method that sets the proxy for all
connections.
2. HTTPSession.setSimpleProxy(String host, int port)
This is an instance method that sets the proxy for a
given connection.
The remaining issue is how to get the HTTPSession instance.
Do you normally use the HttpClientManager class to set up
connections?
=Dennis Heimbigner
This change appears in NetCDF-Java 4.2.28. I've updated 'setproxy.m' to set a
global proxy. That should resolve this issue.
Original comment by bschlin...@gmail.com
on 19 Dec 2011 at 6:46
Original issue reported on code.google.com by
aglo...@email.de
on 15 Nov 2011 at 9:23