hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Simple Protocol.registerProtocol() question
Date Thu, 04 Aug 2005 14:52:55 GMT
Hareesh,

The default protocol port will be used if no port has been set explicitly 
in the request URI or the HostConfiguration instance associated with the 
HTTP method being executed

myhttps://myhost/stuff // no port given. 
// Use the default one associated with the 'myhttps' protocol instance

myhttps://myhost:7777/more%20stuff

One can always override the default port by giving a different one in
the request URI or in the HostConfiguration instance

Hope this helps,

Oleg


On Thu, Aug 04, 2005 at 09:57:52AM -0400, Kadlabalu, Hareesh wrote:
> Hi, 
> 
> May be this question is answered or there is documentation and I am just not
> seeing it; if so my apologies.
> 
>  
> 
> I want to build external configuration for registering ProtocolSocketFactory
> per protocol (one for http, one for https etc), however port numbers can be
> anything.
> 
>  
> 
> I can specify Protocol.registerProtocol( "https", new Protocol( "https",
> MyProtocolSocketFactory.getInstance(), 443 )  );
> 
>  
> 
> The Javadoc says that the port specified is the 'default' port, so am I
> correct in assuming that MyProtocolSocketFactory would be used for 'https'
> and whatever port or only port 443? In other words, is the registration of
> ProtocolSocketFactory specific to a protocol type (http/https) or 'type and
> port number' combination? 
> 
>  
> 
> Thanks
> 
> -Hareesh
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 

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


Mime
View raw message