You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Joshua Preston <Jo...@tfcci.com> on 2006/12/27 22:39:17 UTC

Re: HTTPClient and Proxy problems (Unknown Host) even with systemproxy set.

Roland,


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


http://wiki.apache.org/jakarta-httpclient/FrequentlyAskedApplicationDesignQuestions


> 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):
> http://mail-archives.apache.org/mod_mbox/jakarta-httpclient-user/200606.mbox/%3c44A262C5.7000809@dubioso.net%3e


Yeah, I see the points made.


> 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.

It is a temporary fix for our situation because our developers are not
in control of the proxies, nor are we allowed to dictate which of our
proxies to utilize.  In the past, we utilized the system properties to
force the proxy on the developer.  For now, we've migrated to Spring,
and while this does give us a little flexibility in the setting of
proxies and such, it does not help us for our client-side applications.
Currently we utilize the proxyHost, proxyPort and proxySet to determine
if a proxy should be utilized on the machine, it's an on/off scenario.
Additionally, we considering using JMX and mbeans to configure this on
the fly.

> > 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.

I'm not looking for a major change, just one that looks to see if
proxySet is true, if it is, then utilize the system proxy settings.

Thanks,

Joshua Preston.
--
Joshua Preston <jo...@tfcci.com>
Software Engineer
Twenty First Century Communications



Q: What lies on the bottom of the ocean and twitches? A: A nervous
wreck.



Re: HTTPClient and Proxy problems (Unknown Host) even with systemproxy set.

Posted by Roland Weber <ht...@dubioso.net>.
Hi Joshua,

I updated the Application Design FAQ on proxy configuration.
http://wiki.apache.org/jakarta-httpclient/FrequentlyAskedApplicationDesignQuestions

Thanks for getting this started.

It seems that Java 5.0 finally has some classes to properly
address the proxy configuration problem for applets. Maybe
they can be of help for you too?
http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/proxie_config.html


Happy new year to everyone... I'll be offline for the rest of 2006.

cheers,
  Roland

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


Re: HTTPClient and Proxy problems (Unknown Host) even with systemproxy set.

Posted by Roland Weber <ht...@dubioso.net>.
Hi Joshua,

> I'm not looking for a major change, just one that looks to see if
> proxySet is true, if it is, then utilize the system proxy settings.

And that is a major change. Up until now, every HttpClient user
is sure that system proxy settings will not interfere with their
application's behavior. Those that need a proxy set it, getting
the configuration data from their own configuration properties
or XML files, or from the system properties, or from the Windows
registry, or...
Additionally there are not only http.proxyHost and http.proxyPort
to consider. There is a bunch of other system properties that
affect the HttpURLConnection:
http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html

If HttpClient were to pick up http.proxyHost automatically, users
could reasonably expect it to pick up http.nonProxyHosts as well.
I guess you see where this is heading.

cheers,
  Roland

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