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 ha...@tcs.com on 2006/03/31 05:50:45 UTC
Protocol registration
I am trying to post form values to a web site through a proxy over an
HTTPS connection
I have been able to get it to work using the SSL guide.
I had a few queries regarding Protocol registration
In the SSL guide a Protocol is registered using
Protocol.registerProtocol("https",
new Protocol("https", new MySSLSocketFactory(), 443));
If I am posting form values to a URL like
https://www.whatever.com
It will use the registered protocol (and port 443)
If I however want to connect to say
https://www.whatever.com:8083
do I need to parse the URL to get the port 8083 and then
register the protocol using the parsed port with
Protocol.registerProtocol("https",
new Protocol("https", new MySSLSocketFactory(), iPortParsedFromURL));
or can I still use
Protocol.registerProtocol("https",
new Protocol("https", new MySSLSocketFactory(), 443));
and it is automatically taken care of
Thanks and Regards
Harjinder
Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
Re: Protocol registration
Posted by Roland Weber <RO...@de.ibm.com>.
Hello Harjinder,
the port number at registration is the default port.
The factory will be selected based on the protocol name "https",
not based on the port number. You don't have to parse the URL.
cheers,
Roand
harjinder.takher@tcs.com
31.03.2006 05:50
Please respond to
"HttpClient User Discussion"
To
"HttpClient User Discussion" <ht...@jakarta.apache.org>
cc
Subject
Protocol registration
I am trying to post form values to a web site through a proxy over an
HTTPS connection
I have been able to get it to work using the SSL guide.
I had a few queries regarding Protocol registration
In the SSL guide a Protocol is registered using
Protocol.registerProtocol("https",
new Protocol("https", new MySSLSocketFactory(), 443));
If I am posting form values to a URL like
https://www.whatever.com
It will use the registered protocol (and port 443)
If I however want to connect to say
https://www.whatever.com:8083
do I need to parse the URL to get the port 8083 and then
register the protocol using the parsed port with
Protocol.registerProtocol("https",
new Protocol("https", new MySSLSocketFactory(), iPortParsedFromURL));
or can I still use
Protocol.registerProtocol("https",
new Protocol("https", new MySSLSocketFactory(), 443));
and it is automatically taken care of
Thanks and Regards
Harjinder
Notice: The information contained in this e-mail message and/or
attachments to it may contain confidential or privileged information. If
you are not the intended recipient, any dissemination, use, review,
distribution, printing or copying of the information contained in this
e-mail message and/or attachments to it are strictly prohibited. If you
have received this communication in error, please notify us by reply
e-mail or telephone and immediately and permanently delete the message and
any attachments. Thank you
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org