commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noam Berg <n...@SofaWare.com>
Subject [httpclient]-timeout-> i found a small but important bug.
Date Thu, 07 Nov 2002 17:28:35 GMT
Hello, 
I need to use http connections with timeouts, since it is not part of the
release i downloaded 7th Nov 2002 sources, but 
using HttpClient.setTimeout didnt help. i checked out the code and find out
that when you create the sockets using host+port
it immediately connects so setting the timeout after that does not change
(at least in my case where i dont reuse them 
and its important in first connect for a timeout to be set).

The changes:
line 350:
	 _socket = new Socket();
	_socket.connect(new
java.net.InetSocketAddress(host,port),_so_timeout);
 
line 781:
	Socket s = sslSocketFactory.createSocket();
	s.connect(new java.net.InetSocketAddress(host, port), _so_timeout);
            return s;

and the whole file :
 <<HttpConnection.java>> 

i'm sorry but i dont have CVS ... 
10x.

P.S.
Another small thing (suggestion) ... 
When i first started using this package i wanted to do a very simple
httpconnection ... 
what would have help me _a lot_ would have been a few small source examples
for usage
(maybe a bit like your test classes).
10x

Noam Berg
R&D
SofaWare Technologies Ltd.
3 Hahilazon St. Ramat-Gan Israel
Tel:  +972-3-6128989 ext 102
Fax: +972-3-5755442
E-mail: noam@sofaware.com
Web: http://www.sofaware.com



Mime
View raw message