hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: [HttpConn] Scheme
Date Sun, 28 Jan 2007 20:44:52 GMT
On Sun, 2007-01-28 at 10:30 +0100, Roland Weber wrote:
> Hi all,
> 
> I'm planning to make some changes to the Scheme class.
> In HttpClient I need to decide whether a route requires
> tunnelling, which depends on the socket factory for the
> target host scheme, that's why I want to change it now.
> There are two things I don't like:
> 
> 1. The static map of registered schemes. Let's replace
>    it with a new SchemeSet class that can be instantiated
>    dynamically. A static default SchemeSet can still be
>    kept for fallbacks.
> 

SchemeRegistry maybe?


> 2. A scheme ID is not required to match the name:
> 
>      Scheme s = new Scheme("http",...,80);
>      Scheme.registerScheme("http", s);
>      Scheme.registerScheme("https", s);
> 
>      String id = "https";
>      if (!Scheme.getScheme(id).getName().equals(id))
>         System.out.println("I am confused");
> 
>    I'd give the new SchemeSet class a register(Scheme)
>    method that uses the scheme name as identifier.
> 

I think scheme ID is still needed, if we want to be able to support
custom scheme aliases. Aliased schemes can be very handy when dealing
with different SSL contexts, for instance. 

myhttps1 (some custom SSL settings) -> https
myhttps2 (some other custom SSL settings) -> https

> 
> objections?
> 

Go for it.

Oleg

> cheers,
>   Roland
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
> 
> 


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


Mime
View raw message