JDK-4811482 : sun.net.client.defaultConnectTimeout should work with HttpsURLConnection
  • Type: Enhancement
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Affected Version: 1.4.1
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2003-01-31
  • Updated: 2003-10-20
  • Resolved: 2003-10-20
Related Reports
Duplicate :  
Relates :  
Description
Name: nt126004			Date: 01/31/2003


FULL PRODUCT VERSION :
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)

FULL OPERATING SYSTEM VERSION :
SunOS bem 5.8 Generic_108528-17 sun4u sparc SUNW,Netra-T4

ADDITIONAL OPERATING SYSTEMS :
Windows 2000 Professional



A DESCRIPTION OF THE PROBLEM :
The sun.net.client.defaultConnectTimeout and
sun.net.client.defaultReadTimeout timeouts do not appear to
work when using HTTPS connections.



REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
System.setProperty("sun.net.client.defaultConnectTimeout",
                   "1000");
System.setProperty("sun.net.client.defaultReadTimeout",
                   "2000");

/* Ensure connection will timeout before running */
URL mysite = new URL("https://www.verisign.com");

URLConnection mysite = url.openConnection();


---------- END SOURCE ----------
(Review ID: 180577) 
======================================================================
- This is happening still in 1.4.2. Hence it is not addressed in 1.4.2

Comments
EVALUATION Submitter is correct, HttpsClient's doConnect overrides the NetworkClient's doConnect, and thus doesn't respect the properties. Will need to think about whether this is a showstopper for mantis. I'm leaning away from it, so if this is critical, please let us know. ###@###.### 2003-01-31 Not a showstopper, fix for tiger. Yingxian is working on 4700777 anyway, which this is related to this bug. ###@###.### 2003-03-31 Both the old system property sun.net.client.default(Connect|Read)Timeout and the Tiger new APIs for setting timeout (URLConnection.(set|get)(Connect|Read)Timeout() are supported as a result of fixing 4905410: Https needs to support new tiger features that went into http. ###@###.### 2003-10-20
20-10-2003