Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
e14d4e1b
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
3
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e14d4e1b
编写于
4月 12, 2010
作者:
V
valeriep
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
fc246bc7
edc78b71
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
196 addition
and
88 deletion
+196
-88
make/tools/CharsetMapping/Big5.c2b
make/tools/CharsetMapping/Big5.c2b
+0
-8
make/tools/CharsetMapping/Big5.map
make/tools/CharsetMapping/Big5.map
+13
-0
src/share/classes/sun/misc/SharedSecrets.java
src/share/classes/sun/misc/SharedSecrets.java
+4
-1
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java
.../www/protocol/https/HttpsURLConnection/DNSIdentities.java
+23
-10
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/HttpsPost.java
.../net/www/protocol/https/HttpsURLConnection/HttpsPost.java
+42
-23
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressDNSIdentities.java
...ocol/https/HttpsURLConnection/IPAddressDNSIdentities.java
+17
-6
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java
...tocol/https/HttpsURLConnection/IPAddressIPIdentities.java
+19
-6
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java
...t/www/protocol/https/HttpsURLConnection/IPIdentities.java
+19
-6
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java
...net/www/protocol/https/HttpsURLConnection/Identities.java
+19
-6
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Redirect.java
...n/net/www/protocol/https/HttpsURLConnection/Redirect.java
+40
-22
未找到文件。
make/tools/CharsetMapping/Big5.c2b
已删除
100644 → 0
浏览文件 @
fc246bc7
#Add the following 5 characters which are duplicated
#or have conflicts with other characters.
0xA1C4 0xFF3F #REGWARN Fallback 0xA1C4 SPACING UNDERSCORE
0xA2AC 0x2571 #REGWARN Fallback 0xA2AC LT DIAG UP RIGHT TO LOW LEFT
0xA2AD 0x2572 #REGWARN Fallback 0xA2AD LT DIAG UP LEFT TO LOW RIGHT
0xA451 0x5341 #REGWARN Fallback 0xA451 HANGZHOU NUMERAL TEN
0xA4CA 0x5345 #REGWARN Fallback 0xA4CA HANGZHOU NUMERAL THIRTY
#
make/tools/CharsetMapping/Big5.map
浏览文件 @
e14d4e1b
...
@@ -13830,8 +13830,21 @@
...
@@ -13830,8 +13830,21 @@
0xF9D4 0x9F49 # <CJK>
0xF9D4 0x9F49 # <CJK>
0xF9D5 0x9F98 # <CJK>
0xF9D5 0x9F98 # <CJK>
#
#
# from Big5.b2c-irreversible
#
0xA15A 0xFF3F #SPACING UNDERSCORE
0xA15A 0xFF3F #SPACING UNDERSCORE
0xA1FE 0x2571 #LT DIAG UP RIGHT TO LOW LEFT
0xA1FE 0x2571 #LT DIAG UP RIGHT TO LOW LEFT
0xA240 0x2572 #LT DIAG UP LEFT TO LOW RIGHTG
0xA240 0x2572 #LT DIAG UP LEFT TO LOW RIGHTG
0xA2CC 0x5341 #HANGHZOU NUMERAL TEN
0xA2CC 0x5341 #HANGHZOU NUMERAL TEN
0xA2CE 0x5345 #HANGZHOU NUMERAL THIRTY
0xA2CE 0x5345 #HANGZHOU NUMERAL THIRTY
#
# Add the following 5 characters from Big5.c2b-irreversible
# It appears these 5 should be here to be the round-trip
# for these 5 characters. Above 5 are the b->c only nrt.
#
0xA1C4 0xFF3F
0xA2AC 0x2571
0xA2AD 0x2572
0xA451 0x5341
0xA4CA 0x5345
#
src/share/classes/sun/misc/SharedSecrets.java
浏览文件 @
e14d4e1b
/*
/*
* Copyright 2002-20
09
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2002-20
10
Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -29,6 +29,7 @@ import java.util.jar.JarFile;
...
@@ -29,6 +29,7 @@ import java.util.jar.JarFile;
import
java.io.Console
;
import
java.io.Console
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileDescriptor
;
import
java.io.FileDescriptor
;
import
java.security.ProtectionDomain
;
/** A repository of "shared secrets", which are a mechanism for
/** A repository of "shared secrets", which are a mechanism for
calling implementation-private methods in another package without
calling implementation-private methods in another package without
...
@@ -121,6 +122,8 @@ public class SharedSecrets {
...
@@ -121,6 +122,8 @@ public class SharedSecrets {
public
static
JavaSecurityProtectionDomainAccess
public
static
JavaSecurityProtectionDomainAccess
getJavaSecurityProtectionDomainAccess
()
{
getJavaSecurityProtectionDomainAccess
()
{
if
(
javaSecurityProtectionDomainAccess
==
null
)
unsafe
.
ensureClassInitialized
(
ProtectionDomain
.
class
);
return
javaSecurityProtectionDomainAccess
;
return
javaSecurityProtectionDomainAccess
;
}
}
}
}
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java
浏览文件 @
e14d4e1b
...
@@ -623,6 +623,11 @@ public class DNSIdentities {
...
@@ -623,6 +623,11 @@ public class DNSIdentities {
*/
*/
volatile
static
boolean
serverReady
=
false
;
volatile
static
boolean
serverReady
=
false
;
/*
* Is the connection ready to close?
*/
volatile
static
boolean
closeReady
=
false
;
/*
/*
* Turn on SSL debugging?
* Turn on SSL debugging?
*/
*/
...
@@ -670,11 +675,14 @@ public class DNSIdentities {
...
@@ -670,11 +675,14 @@ public class DNSIdentities {
out
.
print
(
"Testing\r\n"
);
out
.
print
(
"Testing\r\n"
);
out
.
flush
();
out
.
flush
();
}
finally
{
}
finally
{
// close the socket
// close the socket
Thread
.
sleep
(
2000
);
while
(!
closeReady
)
{
System
.
out
.
println
(
"Server closing socket"
);
Thread
.
sleep
(
50
);
sslSocket
.
close
();
}
serverReady
=
false
;
System
.
out
.
println
(
"Server closing socket"
);
sslSocket
.
close
();
serverReady
=
false
;
}
}
}
}
...
@@ -704,12 +712,17 @@ public class DNSIdentities {
...
@@ -704,12 +712,17 @@ public class DNSIdentities {
URL
url
=
new
URL
(
"https://localhost:"
+
serverPort
+
"/"
);
URL
url
=
new
URL
(
"https://localhost:"
+
serverPort
+
"/"
);
System
.
out
.
println
(
"url is "
+
url
.
toString
());
System
.
out
.
println
(
"url is "
+
url
.
toString
());
http
=
(
HttpsURLConnection
)
url
.
openConnection
();
try
{
http
=
(
HttpsURLConnection
)
url
.
openConnection
();
int
respCode
=
http
.
getResponseCode
();
System
.
out
.
println
(
"respCode = "
+
respCode
);
http
.
disconnect
();
int
respCode
=
http
.
getResponseCode
();
System
.
out
.
println
(
"respCode = "
+
respCode
);
}
finally
{
if
(
http
!=
null
)
{
http
.
disconnect
();
}
closeReady
=
true
;
}
}
}
/*
/*
...
...
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/HttpsPost.java
浏览文件 @
e14d4e1b
...
@@ -60,6 +60,11 @@ public class HttpsPost {
...
@@ -60,6 +60,11 @@ public class HttpsPost {
*/
*/
volatile
static
boolean
serverReady
=
false
;
volatile
static
boolean
serverReady
=
false
;
/*
* Is the connection ready to close?
*/
volatile
static
boolean
closeReady
=
false
;
/*
/*
* Turn on SSL debugging?
* Turn on SSL debugging?
*/
*/
...
@@ -98,25 +103,34 @@ public class HttpsPost {
...
@@ -98,25 +103,34 @@ public class HttpsPost {
serverReady
=
true
;
serverReady
=
true
;
SSLSocket
sslSocket
=
(
SSLSocket
)
sslServerSocket
.
accept
();
SSLSocket
sslSocket
=
(
SSLSocket
)
sslServerSocket
.
accept
();
InputStream
sslIS
=
sslSocket
.
getInputStream
();
try
{
OutputStream
sslOS
=
sslSocket
.
getOutputStream
();
InputStream
sslIS
=
sslSocket
.
getInputStream
();
BufferedReader
br
=
new
BufferedReader
(
new
InputStreamReader
(
sslIS
));
OutputStream
sslOS
=
sslSocket
.
getOutputStream
();
PrintStream
ps
=
new
PrintStream
(
sslOS
);
BufferedReader
br
=
// process HTTP POST request from client
new
BufferedReader
(
new
InputStreamReader
(
sslIS
));
System
.
out
.
println
(
"status line: "
+
br
.
readLine
());
PrintStream
ps
=
new
PrintStream
(
sslOS
);
String
msg
=
null
;
while
((
msg
=
br
.
readLine
())
!=
null
&&
msg
.
length
()
>
0
);
// process HTTP POST request from client
System
.
out
.
println
(
"status line: "
+
br
.
readLine
());
msg
=
br
.
readLine
();
String
msg
=
null
;
if
(
msg
.
equals
(
postMsg
))
{
while
((
msg
=
br
.
readLine
())
!=
null
&&
msg
.
length
()
>
0
);
ps
.
println
(
"HTTP/1.1 200 OK\n\n"
);
}
else
{
msg
=
br
.
readLine
();
ps
.
println
(
"HTTP/1.1 500 Not OK\n\n"
);
if
(
msg
.
equals
(
postMsg
))
{
ps
.
println
(
"HTTP/1.1 200 OK\n\n"
);
}
else
{
ps
.
println
(
"HTTP/1.1 500 Not OK\n\n"
);
}
ps
.
flush
();
// close the socket
while
(!
closeReady
)
{
Thread
.
sleep
(
50
);
}
}
finally
{
sslSocket
.
close
();
sslServerSocket
.
close
();
}
}
ps
.
flush
();
Thread
.
sleep
(
2000
);
sslSocket
.
close
();
sslServerSocket
.
close
();
}
}
/*
/*
...
@@ -144,12 +158,17 @@ public class HttpsPost {
...
@@ -144,12 +158,17 @@ public class HttpsPost {
http
.
setRequestMethod
(
"POST"
);
http
.
setRequestMethod
(
"POST"
);
PrintStream
ps
=
new
PrintStream
(
http
.
getOutputStream
());
PrintStream
ps
=
new
PrintStream
(
http
.
getOutputStream
());
ps
.
println
(
postMsg
);
try
{
ps
.
flush
();
ps
.
println
(
postMsg
);
if
(
http
.
getResponseCode
()
!=
200
)
{
ps
.
flush
();
throw
new
RuntimeException
(
"test Failed"
);
if
(
http
.
getResponseCode
()
!=
200
)
{
throw
new
RuntimeException
(
"test Failed"
);
}
}
finally
{
ps
.
close
();
http
.
disconnect
();
closeReady
=
true
;
}
}
ps
.
close
();
}
}
static
class
NameVerifier
implements
HostnameVerifier
{
static
class
NameVerifier
implements
HostnameVerifier
{
...
...
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressDNSIdentities.java
浏览文件 @
e14d4e1b
...
@@ -623,6 +623,11 @@ public class IPAddressDNSIdentities {
...
@@ -623,6 +623,11 @@ public class IPAddressDNSIdentities {
*/
*/
volatile
static
boolean
serverReady
=
false
;
volatile
static
boolean
serverReady
=
false
;
/*
* Is the connection ready to close?
*/
volatile
static
boolean
closeReady
=
false
;
/*
/*
* Turn on SSL debugging?
* Turn on SSL debugging?
*/
*/
...
@@ -670,11 +675,14 @@ public class IPAddressDNSIdentities {
...
@@ -670,11 +675,14 @@ public class IPAddressDNSIdentities {
out
.
print
(
"Testing\r\n"
);
out
.
print
(
"Testing\r\n"
);
out
.
flush
();
out
.
flush
();
}
finally
{
}
finally
{
// close the socket
// close the socket
Thread
.
sleep
(
2000
);
while
(!
closeReady
)
{
System
.
out
.
println
(
"Server closing socket"
);
Thread
.
sleep
(
50
);
sslSocket
.
close
();
}
serverReady
=
false
;
System
.
out
.
println
(
"Server closing socket"
);
sslSocket
.
close
();
serverReady
=
false
;
}
}
}
}
...
@@ -716,7 +724,10 @@ public class IPAddressDNSIdentities {
...
@@ -716,7 +724,10 @@ public class IPAddressDNSIdentities {
// no subject alternative names matching IP address 127.0.0.1 found
// no subject alternative names matching IP address 127.0.0.1 found
// that's the expected exception, ignore it.
// that's the expected exception, ignore it.
}
finally
{
}
finally
{
http
.
disconnect
();
if
(
http
!=
null
)
{
http
.
disconnect
();
}
closeReady
=
true
;
}
}
}
}
...
...
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java
浏览文件 @
e14d4e1b
...
@@ -624,6 +624,11 @@ public class IPAddressIPIdentities {
...
@@ -624,6 +624,11 @@ public class IPAddressIPIdentities {
*/
*/
volatile
static
boolean
serverReady
=
false
;
volatile
static
boolean
serverReady
=
false
;
/*
* Is the connection ready to close?
*/
volatile
static
boolean
closeReady
=
false
;
/*
/*
* Turn on SSL debugging?
* Turn on SSL debugging?
*/
*/
...
@@ -672,7 +677,10 @@ public class IPAddressIPIdentities {
...
@@ -672,7 +677,10 @@ public class IPAddressIPIdentities {
out
.
flush
();
out
.
flush
();
}
finally
{
}
finally
{
// close the socket
// close the socket
Thread
.
sleep
(
2000
);
while
(!
closeReady
)
{
Thread
.
sleep
(
50
);
}
System
.
out
.
println
(
"Server closing socket"
);
System
.
out
.
println
(
"Server closing socket"
);
sslSocket
.
close
();
sslSocket
.
close
();
serverReady
=
false
;
serverReady
=
false
;
...
@@ -705,12 +713,17 @@ public class IPAddressIPIdentities {
...
@@ -705,12 +713,17 @@ public class IPAddressIPIdentities {
URL
url
=
new
URL
(
"https://127.0.0.1:"
+
serverPort
+
"/"
);
URL
url
=
new
URL
(
"https://127.0.0.1:"
+
serverPort
+
"/"
);
System
.
out
.
println
(
"url is "
+
url
.
toString
());
System
.
out
.
println
(
"url is "
+
url
.
toString
());
http
=
(
HttpsURLConnection
)
url
.
openConnection
();
try
{
http
=
(
HttpsURLConnection
)
url
.
openConnection
();
int
respCode
=
http
.
getResponseCode
();
System
.
out
.
println
(
"respCode = "
+
respCode
);
http
.
disconnect
();
int
respCode
=
http
.
getResponseCode
();
System
.
out
.
println
(
"respCode = "
+
respCode
);
}
finally
{
if
(
http
!=
null
)
{
http
.
disconnect
();
}
closeReady
=
true
;
}
}
}
/*
/*
...
...
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java
浏览文件 @
e14d4e1b
...
@@ -624,6 +624,11 @@ public class IPIdentities {
...
@@ -624,6 +624,11 @@ public class IPIdentities {
*/
*/
volatile
static
boolean
serverReady
=
false
;
volatile
static
boolean
serverReady
=
false
;
/*
* Is the connection ready to close?
*/
volatile
static
boolean
closeReady
=
false
;
/*
/*
* Turn on SSL debugging?
* Turn on SSL debugging?
*/
*/
...
@@ -672,7 +677,10 @@ public class IPIdentities {
...
@@ -672,7 +677,10 @@ public class IPIdentities {
out
.
flush
();
out
.
flush
();
}
finally
{
}
finally
{
// close the socket
// close the socket
Thread
.
sleep
(
2000
);
while
(!
closeReady
)
{
Thread
.
sleep
(
50
);
}
System
.
out
.
println
(
"Server closing socket"
);
System
.
out
.
println
(
"Server closing socket"
);
sslSocket
.
close
();
sslSocket
.
close
();
serverReady
=
false
;
serverReady
=
false
;
...
@@ -705,12 +713,17 @@ public class IPIdentities {
...
@@ -705,12 +713,17 @@ public class IPIdentities {
URL
url
=
new
URL
(
"https://localhost:"
+
serverPort
+
"/"
);
URL
url
=
new
URL
(
"https://localhost:"
+
serverPort
+
"/"
);
System
.
out
.
println
(
"url is "
+
url
.
toString
());
System
.
out
.
println
(
"url is "
+
url
.
toString
());
http
=
(
HttpsURLConnection
)
url
.
openConnection
();
try
{
http
=
(
HttpsURLConnection
)
url
.
openConnection
();
int
respCode
=
http
.
getResponseCode
();
System
.
out
.
println
(
"respCode = "
+
respCode
);
http
.
disconnect
();
int
respCode
=
http
.
getResponseCode
();
System
.
out
.
println
(
"respCode = "
+
respCode
);
}
finally
{
if
(
http
!=
null
)
{
http
.
disconnect
();
}
closeReady
=
true
;
}
}
}
/*
/*
...
...
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java
浏览文件 @
e14d4e1b
...
@@ -623,6 +623,11 @@ public class Identities {
...
@@ -623,6 +623,11 @@ public class Identities {
*/
*/
volatile
static
boolean
serverReady
=
false
;
volatile
static
boolean
serverReady
=
false
;
/*
* Is the connection ready to close?
*/
volatile
static
boolean
closeReady
=
false
;
/*
/*
* Turn on SSL debugging?
* Turn on SSL debugging?
*/
*/
...
@@ -671,7 +676,10 @@ public class Identities {
...
@@ -671,7 +676,10 @@ public class Identities {
out
.
flush
();
out
.
flush
();
}
finally
{
}
finally
{
// close the socket
// close the socket
Thread
.
sleep
(
2000
);
while
(!
closeReady
)
{
Thread
.
sleep
(
50
);
}
System
.
out
.
println
(
"Server closing socket"
);
System
.
out
.
println
(
"Server closing socket"
);
sslSocket
.
close
();
sslSocket
.
close
();
serverReady
=
false
;
serverReady
=
false
;
...
@@ -704,12 +712,17 @@ public class Identities {
...
@@ -704,12 +712,17 @@ public class Identities {
URL
url
=
new
URL
(
"https://localhost:"
+
serverPort
+
"/"
);
URL
url
=
new
URL
(
"https://localhost:"
+
serverPort
+
"/"
);
System
.
out
.
println
(
"url is "
+
url
.
toString
());
System
.
out
.
println
(
"url is "
+
url
.
toString
());
http
=
(
HttpsURLConnection
)
url
.
openConnection
();
try
{
http
=
(
HttpsURLConnection
)
url
.
openConnection
();
int
respCode
=
http
.
getResponseCode
();
System
.
out
.
println
(
"respCode = "
+
respCode
);
http
.
disconnect
();
int
respCode
=
http
.
getResponseCode
();
System
.
out
.
println
(
"respCode = "
+
respCode
);
}
finally
{
if
(
http
!=
null
)
{
http
.
disconnect
();
}
closeReady
=
true
;
}
}
}
/*
/*
...
...
test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Redirect.java
浏览文件 @
e14d4e1b
...
@@ -60,6 +60,11 @@ public class Redirect {
...
@@ -60,6 +60,11 @@ public class Redirect {
*/
*/
volatile
static
boolean
serverReady
=
false
;
volatile
static
boolean
serverReady
=
false
;
/*
* Is the connection ready to close?
*/
volatile
static
boolean
closeReady
=
false
;
/*
/*
* Turn on SSL debugging?
* Turn on SSL debugging?
*/
*/
...
@@ -98,24 +103,33 @@ public class Redirect {
...
@@ -98,24 +103,33 @@ public class Redirect {
serverReady
=
true
;
serverReady
=
true
;
SSLSocket
sslSocket
=
(
SSLSocket
)
sslServerSocket
.
accept
();
SSLSocket
sslSocket
=
(
SSLSocket
)
sslServerSocket
.
accept
();
InputStream
sslIS
=
sslSocket
.
getInputStream
();
try
{
OutputStream
sslOS
=
sslSocket
.
getOutputStream
();
InputStream
sslIS
=
sslSocket
.
getInputStream
();
BufferedReader
br
=
new
BufferedReader
(
new
InputStreamReader
(
sslIS
));
OutputStream
sslOS
=
sslSocket
.
getOutputStream
();
PrintStream
ps
=
new
PrintStream
(
sslOS
);
BufferedReader
br
=
// process HTTP POST request from client
new
BufferedReader
(
new
InputStreamReader
(
sslIS
));
System
.
out
.
println
(
"status line: "
+
br
.
readLine
());
PrintStream
ps
=
new
PrintStream
(
sslOS
);
ps
.
println
(
"HTTP/1.1 307 Redirect"
);
// process HTTP POST request from client
ps
.
println
(
"Location: https://localhost:"
+
serverPort
+
"/index.html\n\n"
);
System
.
out
.
println
(
"status line: "
+
br
.
readLine
());
ps
.
flush
();
sslSocket
=
(
SSLSocket
)
sslServerSocket
.
accept
();
ps
.
println
(
"HTTP/1.1 307 Redirect"
);
sslOS
=
sslSocket
.
getOutputStream
();
ps
.
println
(
"Location: https://localhost:"
+
serverPort
+
ps
=
new
PrintStream
(
sslOS
);
"/index.html\n\n"
);
ps
.
println
(
"HTTP/1.1 200 Redirect succeeded\n\n"
);
ps
.
flush
();
ps
.
flush
();
sslSocket
=
(
SSLSocket
)
sslServerSocket
.
accept
();
Thread
.
sleep
(
2000
);
sslOS
=
sslSocket
.
getOutputStream
();
sslSocket
.
close
();
ps
=
new
PrintStream
(
sslOS
);
sslServerSocket
.
close
();
ps
.
println
(
"HTTP/1.1 200 Redirect succeeded\n\n"
);
ps
.
flush
();
}
finally
{
// close the socket
while
(!
closeReady
)
{
Thread
.
sleep
(
50
);
}
sslSocket
.
close
();
sslServerSocket
.
close
();
}
}
}
/*
/*
...
@@ -139,10 +153,14 @@ public class Redirect {
...
@@ -139,10 +153,14 @@ public class Redirect {
HttpsURLConnection
.
setDefaultHostnameVerifier
(
HttpsURLConnection
.
setDefaultHostnameVerifier
(
new
NameVerifier
());
new
NameVerifier
());
HttpsURLConnection
http
=
(
HttpsURLConnection
)
url
.
openConnection
();
HttpsURLConnection
http
=
(
HttpsURLConnection
)
url
.
openConnection
();
try
{
System
.
out
.
println
(
"response header: "
+
http
.
getHeaderField
(
0
));
System
.
out
.
println
(
"response header: "
+
http
.
getHeaderField
(
0
));
if
(
http
.
getResponseCode
()
!=
200
)
{
if
(
http
.
getResponseCode
()
!=
200
)
{
throw
new
RuntimeException
(
"test Failed"
);
throw
new
RuntimeException
(
"test Failed"
);
}
}
finally
{
http
.
disconnect
();
closeReady
=
true
;
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录