Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.7.1, 2.7.2
-
None
-
Unknown
Description
I´m trying to get CXF in combination with HttpAsyncClient to talk to my server over HTTPS. What I found is that when I try to consume the url https://myserver/service, CXF/HttpAsyncClient will actually try to talk TLS to my server on port 80.
Digging around in various source code, I found that the getTarget() method in CXFHttpAsyncRequestProducer is a bit unfortunate. It seems to be hard coded to use port 80, unless a port is specified. I´m suggesting that instead of hard coding port 80, CXFHttpAsyncRequestProducer should be looking at the scheme registry to find an appropriate port or just set the port to -1. In case it returns -1, HttpAsyncClient will do a lookup in the scheme registry to find default port for the requested scheme (ie. http=80, https=443)