You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Gary hendrix Clapton <gu...@yahoo.es> on 2004/11/22 22:47:47 UTC

[httpclient]all messages from the same local port

Hi all,

I'm trying to develop a ssl client-server.

- I need to send all messages within the same
connection to obtain only 1 ssl negotiation, and all
messages (executeMethod(post) instances) must share
this link and don't negotiate ssl for each of them.

- Now I have done this for each message
(Login,Logout):
HttpClient client = new HttpClient();
PostMethod post = new PostMethod();
...
client.executeMethod(post);

but, when I send firstly Login and secondly
Logout...it sends them from different ports, so there
are 2 ssl negotiations.

I would appreciate any help.


	
	
		
______________________________________________
Renovamos el Correo Yahoo!: ¡100 MB GRATIS!
Nuevos servicios, más seguridad
http://correo.yahoo.es

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


Re: [httpclient]all messages from the same local port

Posted by Oleg Kalnichevski <ol...@apache.org>.
Gary,

It actually takes two to tango. Are you sure that the target server
supports persistent connections/keeps connections alive? Usually
HttpClient does a reasonably good job reusing persistent connections.

Please consider generating the wire/context log to find as to why the
connection needs to be renegotiated. 

http://jakarta.apache.org/commons/httpclient/logging.html

Oleg


On Mon, 2004-11-22 at 22:47 +0100, Gary hendrix Clapton wrote:
> Hi all,
> 
> I'm trying to develop a ssl client-server.
> 
> - I need to send all messages within the same
> connection to obtain only 1 ssl negotiation, and all
> messages (executeMethod(post) instances) must share
> this link and don't negotiate ssl for each of them.
> 
> - Now I have done this for each message
> (Login,Logout):
> HttpClient client = new HttpClient();
> PostMethod post = new PostMethod();
> ...
> client.executeMethod(post);
> 
> but, when I send firstly Login and secondly
> Logout...it sends them from different ports, so there
> are 2 ssl negotiations.
> 
> I would appreciate any help.
> 
> 
> 	
> 	
> 		
> ______________________________________________
> Renovamos el Correo Yahoo!: ¡100 MB GRATIS!
> Nuevos servicios, más seguridad
> http://correo.yahoo.es
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


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