Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
4acc0be8
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
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看板
提交
4acc0be8
编写于
1月 23, 2015
作者:
C
coffeys
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8065994: HTTP Tunnel connection to NTLM proxy reauthenticates instead of using keep-alive
Reviewed-by: chegar
上级
9d21d01b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
20 deletion
+16
-20
src/share/classes/sun/net/www/protocol/https/HttpsClient.java
...share/classes/sun/net/www/protocol/https/HttpsClient.java
+16
-20
未找到文件。
src/share/classes/sun/net/www/protocol/https/HttpsClient.java
浏览文件 @
4acc0be8
...
...
@@ -192,22 +192,6 @@ final class HttpsClient extends HttpClient
return
userAgent
;
}
// should remove once HttpClient.newHttpProxy is putback
private
static
Proxy
newHttpProxy
(
String
proxyHost
,
int
proxyPort
)
{
InetSocketAddress
saddr
=
null
;
final
String
phost
=
proxyHost
;
final
int
pport
=
proxyPort
<
0
?
httpsPortNumber
:
proxyPort
;
try
{
saddr
=
java
.
security
.
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedExceptionAction
<
InetSocketAddress
>()
{
public
InetSocketAddress
run
()
{
return
new
InetSocketAddress
(
phost
,
pport
);
}});
}
catch
(
java
.
security
.
PrivilegedActionException
pae
)
{
}
return
new
Proxy
(
Proxy
.
Type
.
HTTP
,
saddr
);
}
// CONSTRUCTOR, FACTORY
...
...
@@ -251,7 +235,7 @@ final class HttpsClient extends HttpClient
throws
IOException
{
this
(
sf
,
url
,
(
proxyHost
==
null
?
null
:
Http
sClient
.
newHttpProxy
(
proxyHost
,
proxyPort
)),
Http
Client
.
newHttpProxy
(
proxyHost
,
proxyPort
,
"https"
)),
connectTimeout
);
}
...
...
@@ -261,6 +245,11 @@ final class HttpsClient extends HttpClient
HttpsClient
(
SSLSocketFactory
sf
,
URL
url
,
Proxy
proxy
,
int
connectTimeout
)
throws
IOException
{
PlatformLogger
logger
=
HttpURLConnection
.
getHttpLogger
();
if
(
logger
.
isLoggable
(
PlatformLogger
.
Level
.
FINEST
))
{
logger
.
finest
(
"Creating new HttpsClient with url:"
+
url
+
" and proxy:"
+
proxy
+
" with connect timeout:"
+
connectTimeout
);
}
this
.
proxy
=
proxy
;
setSSLSocketFactory
(
sf
);
this
.
proxyDisabled
=
true
;
...
...
@@ -317,7 +306,7 @@ final class HttpsClient extends HttpClient
return
HttpsClient
.
New
(
sf
,
url
,
hv
,
(
proxyHost
==
null
?
null
:
Http
sClient
.
newHttpProxy
(
proxyHost
,
proxyPort
)),
Http
Client
.
newHttpProxy
(
proxyHost
,
proxyPort
,
"https"
)),
useCache
,
connectTimeout
,
httpuc
);
}
...
...
@@ -329,6 +318,11 @@ final class HttpsClient extends HttpClient
if
(
p
==
null
)
{
p
=
Proxy
.
NO_PROXY
;
}
PlatformLogger
logger
=
HttpURLConnection
.
getHttpLogger
();
if
(
logger
.
isLoggable
(
PlatformLogger
.
Level
.
FINEST
))
{
logger
.
finest
(
"Looking for HttpClient for URL "
+
url
+
" and proxy value of "
+
p
);
}
HttpsClient
ret
=
null
;
if
(
useCache
)
{
/* see if one's already around */
...
...
@@ -342,14 +336,13 @@ final class HttpsClient extends HttpClient
if
(
ret
!=
null
)
{
if
((
ret
.
proxy
!=
null
&&
ret
.
proxy
.
equals
(
p
))
||
(
ret
.
proxy
==
null
&&
p
==
null
))
{
(
ret
.
proxy
==
null
&&
p
==
Proxy
.
NO_PROXY
))
{
synchronized
(
ret
)
{
ret
.
cachedHttpClient
=
true
;
assert
ret
.
inCache
;
ret
.
inCache
=
false
;
if
(
httpuc
!=
null
&&
ret
.
needsTunneling
())
httpuc
.
setTunnelState
(
TUNNELING
);
PlatformLogger
logger
=
HttpURLConnection
.
getHttpLogger
();
if
(
logger
.
isLoggable
(
PlatformLogger
.
Level
.
FINEST
))
{
logger
.
finest
(
"KeepAlive stream retrieved from the cache, "
+
ret
);
}
...
...
@@ -360,6 +353,9 @@ final class HttpsClient extends HttpClient
// This should be fine as it is very rare that a connection
// to the same host will not use the same proxy.
synchronized
(
ret
)
{
if
(
logger
.
isLoggable
(
PlatformLogger
.
Level
.
FINEST
))
{
logger
.
finest
(
"Not returning this connection to cache: "
+
ret
);
}
ret
.
inCache
=
false
;
ret
.
closeServer
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录