hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: HTTPClient and Proxy problems (Unknown Host) even with systemproxy set.
Date Wed, 27 Dec 2006 21:22:23 GMT
Hi Joshua,

> Ohh snap!  Hmmm... I think I'm going to do a couple of things...  First,
> I'm going to document this on the Wiki...

Thanks for that. I'll have a look at it tomorrow.

> Second of all, I think the
> proxy should be set at run time if the http.proxy* system variables are
> utilized.

No it should not. HttpClient is configured through parameters, not
through system properties. Applications must be able to rely on the
behaviour of HttpClient independently of system settings. That has
been discussed on the mailing list before, for example here (when I
had a bad day):

> For us, its impossible to hard code our proxy, but for a
> temporary fix, I've modified my code to appear as follows:
> 	String proxyHost = System.getProperty("http.proxyHost");
> 	int proxyPort = Integer.parseInt(System.getProperty("http.proxyPort"));

This looks like perfectly good code to me. Why do you consider
it a temporary fix? You get configuration data from a well-defined
location and put them there where HttpClient picks them up. Your
application is in control and HttpClient does what you want it to do.

> Lastly, I think I'm going to see about pushing that to a more permanent
> change into the repository...

Feel free to open a feature request in JIRA and provide a patch.
But you should be aware that we are *consciously* not picking up
system properties, and you'll have a hard time arguing for a
major API change here. Some contrib code for others with the
same requirement would be welcome though.


To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

View raw message