开发者

Java HttpClient emulating IE8 behaviour

Im using Apache HttpClient from HttpComponents projects. I have added custom trust and key managers to it to handle two-way authentication (my trust manager accepts everything and my key manager sends always the same client certificate).

I send two following requests:

1. Get /resource.html (this one redirects to sth.dll using http-equiv="Refresh" meta tag)

2. Get /scripts/sth.dll

I do this to emulate IE8 behaviour which was use to connect to sth.dll service (and it works). If I ty to connect to sth.dll service directly (either using browser or httpclient) I get 500 error: cannot find the path specified. Unfortunately I still get 500 error when I use the above method with manual redirec

My question is what else I need to emulate to get this service working?

Is it possible that the problem lies in the fact that IE reuses data from handshake done in 1 request and my httpclient do two handshakes? If yes then how to force httpclient to reuse ssl informaton

I do not have access to server and the possibility to ask service providers for 开发者_C百科help (because they only support access through ie8). The server is IIS/6.0. There are no visible cookies (I used Fiddler to get info on traffic from IE8).

Can anybody give me some new idea on where to look ?


I think that you are right concerning the handshake.

When browser first connect to server HTTP session is created. Its ID is returned to client as a special cookie. For example in case of java based servers it is jsessionid. Then client sends cookes when it produceds futher requests. Check it out. You should do the same. I hope that if you will send cookies in the second request (get the dll) everything will work.

Good luck.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜