[
https://issues.apache.org/jira/browse/HTTPCLIENT-1481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13935068#comment-13935068
]
Vikram commented on HTTPCLIENT-1481:
------------------------------------
Sure, just that i need to get this thing working, and i have tried most of the
avenues.
So i downloaded SoapUI -> HttpMonitor, and ran the same test with proxy on,
below is the wire i got from this test,
Executing request GET / HTTP/1.1 to https://issues.apache.org:443 via
http://127.0.0.1:8080
2014/03/14 19:44:47:415 IST [DEBUG] RequestAddCookies - CookieSpec selected:
best-match
2014/03/14 19:44:47:429 IST [DEBUG] RequestAuthCache - Auth cache not set in
the context
2014/03/14 19:44:47:430 IST [DEBUG] PoolingHttpClientConnectionManager -
Connection request: [route:
{tls}->http://127.0.0.1:8080->https://issues.apache.org:443][total kept alive:
0; route allocated: 0 of 2; total allocated: 0 of 20]
2014/03/14 19:44:47:446 IST [DEBUG] PoolingHttpClientConnectionManager -
Connection leased: [id: 0][route:
{tls}->http://127.0.0.1:8080->https://issues.apache.org:443][total kept alive:
0; route allocated: 1 of 2; total allocated: 1 of 20]
2014/03/14 19:44:47:459 IST [DEBUG] MainClientExec - Opening connection
{tls}->http://127.0.0.1:8080->https://issues.apache.org:443
2014/03/14 19:44:47:464 IST [DEBUG] HttpClientConnectionOperator - Connecting
to /127.0.0.1:8080
2014/03/14 19:44:47:499 IST [DEBUG] HttpClientConnectionOperator - Connection
established 127.0.0.1:32485<->127.0.0.1:8080
2014/03/14 19:44:47:502 IST [DEBUG] headers - http-outgoing-0 >> CONNECT
issues.apache.org:443 HTTP/1.1
2014/03/14 19:44:47:502 IST [DEBUG] headers - http-outgoing-0 >> Host:
issues.apache.org:443
2014/03/14 19:44:47:502 IST [DEBUG] headers - http-outgoing-0 >>
Proxy-Connection: Keep-Alive
2014/03/14 19:44:47:503 IST [DEBUG] wire - http-outgoing-0 >> "CONNECT
issues.apache.org:443 HTTP/1.1[\r][\n]"
2014/03/14 19:44:47:503 IST [DEBUG] wire - http-outgoing-0 >> "Host:
issues.apache.org:443[\r][\n]"
2014/03/14 19:44:47:503 IST [DEBUG] wire - http-outgoing-0 >>
"Proxy-Connection: Keep-Alive[\r][\n]"
2014/03/14 19:44:47:503 IST [DEBUG] wire - http-outgoing-0 >> "[\r][\n]"
2014/03/14 19:44:49:066 IST [DEBUG] wire - http-outgoing-0 << "HTTP/1.1 200
OK[\r][\n]"
2014/03/14 19:44:49:067 IST [DEBUG] wire - http-outgoing-0 <<
"Transfer-Encoding: chunked[\r][\n]"
2014/03/14 19:44:49:067 IST [DEBUG] wire - http-outgoing-0 << "Server:
Jetty(6.1.26)[\r][\n]"
2014/03/14 19:44:49:067 IST [DEBUG] wire - http-outgoing-0 << "[\r][\n]"
2014/03/14 19:44:49:074 IST [DEBUG] headers - http-outgoing-0 << HTTP/1.1 200 OK
2014/03/14 19:44:49:074 IST [DEBUG] headers - http-outgoing-0 <<
Transfer-Encoding: chunked
2014/03/14 19:44:49:074 IST [DEBUG] headers - http-outgoing-0 << Server:
Jetty(6.1.26)
2014/03/14 19:44:49:080 IST [DEBUG] MainClientExec - Tunnel to target created.
2014/03/14 19:44:49:237 IST [DEBUG] DefaultManagedHttpClientConnection -
http-outgoing-0: Shutdown connection
2014/03/14 19:44:49:237 IST [DEBUG] MainClientExec - Connection discarded
2014/03/14 19:44:49:237 IST [DEBUG] DefaultManagedHttpClientConnection -
http-outgoing-0: Close connection
2014/03/14 19:44:49:237 IST [DEBUG] PoolingHttpClientConnectionManager -
Connection released: [id: 0][route:
{tls}->http://127.0.0.1:8080->https://issues.apache.org:443][total kept alive:
0; route allocated: 0 of 2; total allocated: 0 of 20]
2014/03/14 19:44:49:237 IST [DEBUG] PoolingHttpClientConnectionManager -
Connection manager is shutting down
2014/03/14 19:44:49:238 IST [DEBUG] PoolingHttpClientConnectionManager -
Connection manager shut down
Exception in thread "main" javax.net.ssl.SSLException: Unrecognized SSL
message, plaintext connection?
at
sun.security.ssl.InputRecord.handleUnknownRecord(InputRecord.java:671)
at sun.security.ssl.InputRecord.read(InputRecord.java:504)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927)
at
sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
at
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
at
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323)
at
org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:275)
at
org.apache.http.impl.conn.HttpClientConnectionOperator.upgrade(HttpClientConnectionOperator.java:169)
at
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.upgrade(PoolingHttpClientConnectionManager.java:329)
at
org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:398)
at
org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
at
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
at
org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:115)
at com.httpclient3.TestClient.main(TestClient.java:50)
Here there seems to have been a little more progress, i see "headers -
http-outgoing-0 << HTTP/1.1 200 OK" in the wire, but then
DefaultManagedHttpClientConnection - http-outgoing-0: Shutdown connection
2014/03/14 19:44:49:237 IST [DEBUG] MainClientExec - Connection discarded
And finally it fails with the exception.
> Http Proxy with SSL target not working
> --------------------------------------
>
> Key: HTTPCLIENT-1481
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1481
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.2.6
> Reporter: Vikram
>
> I am using HttpClient 4.0.1 and trying to configure proxy for my target https
> server but its not working.
> Case being Http Client -> Http Proxy -> Https Target.
> Direct communication between the client and the target is working fine, but
> when i introduce the proxy. Followed the example provided here -
> http://hc.apache.org/httpcomponents-client-4.2.x/httpclient/examples/org/apache/http/examples/client/ClientExecuteProxy.java
> Tried posting this on the user lists but no one seems to respond there, is
> this really supported?
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]