JDK-6358816 : java.io.IOException thrown after accept "Hostname Mismatch" warning
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 5.0u6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-12-05
  • Updated: 2011-03-08
  • Resolved: 2006-06-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0u8Resolved
Related Reports
Duplicate :  
Description
Steps to reproduce :
--------------------
1. Uninstall all jdk/jre and remove "Sun" folder in user home
2. Make sure IE setup the right proxy . In IE LAN setting , set proxy server to : webcache.sfbay.sun.com:8080 , and check "Bypass for local addr" and check "Use the same proxy server for all protocols"
2. Install jre1.5.0_06 (build 1.5.0_06-b05)
3. In control panel , set Network Settings as "Use browser settings"
4. In control panel , check on "Enable tracing" "Enable log" "Show console" , and in "Default Java for browsers" ,only check on "Microsoft Internet Explorer".
5. Launch the "host not match" test using:
   jre1.5.0_06\bin\javaws http://sceri.prc.sun.com/~yl153753/https/https_hostnomatch.jnlp
   In "verified" security dialog ,don't check "Always" and click "Run".
   In "Warning - Hostname Mismatch" warning dialog , click "Run"
6. java.io.IOException thrown , and in console , can see 
STATUS: HTTPS_HOSTNOMATCH EXCEPTION
java.io.IOException: Server returned HTTP response code: 400 for URL: https://usna1.central/index.html
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
	at java.net.URL.openStream(Unknown Source)
	at HttpsTest.main(HttpsTest.java:51)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
	at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
	at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

No exception thrown if run with jre 1.6.0 (build 1.6.0-rc-b61)

Comments
EVALUATION this maybe not a webstart bug. In 5.0u6 when try to open a https connection with proxy it will throw Exception that Amy met. src code http://sceri.prc.sun.com/~yl153753/https/src/HttpsTest.java when run "java -cp HttpsTest.jar -DTESTURL=https://usna1.central.sun.com HttpsTest" in command line, it work ok. when run "java -cp HttpsTest.jar -DTESTURL=https://usna1.central.sun.com -Dhttps.proxyHost=webcache.sfbay.sun.com -Dhttps.proxyPort=8080 HttpsTest", it will throw java.io.IOException: Server returned HTTP response code: 400 for URL: https://usna1.central.sun.com/index.html at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) at java.net.URL.openStream(Unknown Source) at HttpsTest.main(HttpsTest.java:51) STATUS: HTTPS_BAT FAIL
06-03-2006

EVALUATION this is caused by https proxy info wrong in tiger, webstart got wrong proxy to use. the bug only happens when try to use https proxy to access https URL from sandbox. not happen in mustang.
06-12-2005