I sit behind a restrictive firewall and need to use a proxy with authentication
to test within an emulator.
The DefaultHttpClient used in CloudmadeUtil, in MapTileDownloader.TileLoader
and in GpxToPHPUploader will not reflect proxy settings.
Either try to fetch proxy settings from the network connections (if possible)
or allow integrators to add their own instance of an HttpClient, e.g. add a
method to MapView:
public void setHttpClient (HttpClient client) { ...}
The HttpClient may look like
public class ProxiedHttpClient extends DefaultHttpClient {
public ProxiedHttpClient () {
super();
HttpHost proxy = new HttpHost(myProxyHost, myProxyPort, "http");
this.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,
proxy);
this.getCredentialsProvider().setCredentials(
new AuthScope(myProxyHost, myProxyPort),
new UsernamePasswordCredentials(myUserName, myPassword));
}
}
Original issue reported on code.google.com by Cornelia.Schalueck@googlemail.com on 15 Sep 2011 at 8:29
Original issue reported on code.google.com by
Cornelia.Schalueck@googlemail.com
on 15 Sep 2011 at 8:29