Log in

No account? Create an account
15 May 2003 @ 03:38 pm
*grumble grumble*  
Have I mentioned recently that I HATE proxy servers. Why do people use them? They seem to exist solely for the pleasure of draconian anal-retentive sysadmins, and rarely server any useful purpose.

They wanted me to write my conduit so that it would work over HTTP. Done. I even made sure it worked over HTTPS. That required linking in another library, but it was doable.

Then, we ran into a site using a proxy server. After doing some research, I find out that even though the network library doesn't have any METHODS for dealing with proxy servers, it can support them if certain system properties are set. I added methods to set these, built a few more dialogs, and created a new release. I've even tested with Microsoft ISA, and it works fine.

Now it turns out that some hospitals have proxy servers that require password authentication! This is getting just silly, but I think I see how to implement it. Again, there are no methods attached to the URL, URLConnection, or HTTPURLConnection classes that have ANYTHING to do with authentication, but instead it's dealt with in a non-obvious way. All I have to do is build my own Authenticator, and REPLACE the System-wide default with the one I want to use!

Here's how I would have things different:

  1. Have static methods (perhaps in the HttpURLConnection class) for setting a default proxy server, port, and Authenticator

  2. Provide non-static methods on the HttpURLConnection class for overriding these defaults FOR A SINGLE request

  3. Document these in the javadoc, and not just in obscure articles on sun.com