Committed fix at revision 37771. Added fallback approach to access the source code contents directly from the servlet object, without having to create a new http connection, when the request was made using SSL.
The way that the source code functionality works is this: the SourceCodeLoaderConnection application-scoped bean makes a request to the SourceCodeLoaderServlet servlet to retrieve a specific resource. SourceCodeLoaderConnection obtains the host name, port number, etc. from the very first request to the app to build a URL to make a request to the SourceCodeLoaderServlet servlet. Originally, it wasn't setting the 'https' protocol, so that was the reason why the connection to the servlet couldn't be made, and an exception was thrown. After this was fixed, a different exception kept occurring (javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target), which could only be fixed by configuring the machine on which the server runs. So, the only possible solution was to access the SourceCodeLoaderServlet functionality directly, by invoking its methods, without making a new connection.
Committed fix at revision 37771. Added fallback approach to access the source code contents directly from the servlet object, without having to create a new http connection, when the request was made using SSL.
The way that the source code functionality works is this: the SourceCodeLoaderConnection application-scoped bean makes a request to the SourceCodeLoaderServlet servlet to retrieve a specific resource. SourceCodeLoaderConnection obtains the host name, port number, etc. from the very first request to the app to build a URL to make a request to the SourceCodeLoaderServlet servlet. Originally, it wasn't setting the 'https' protocol, so that was the reason why the connection to the servlet couldn't be made, and an exception was thrown. After this was fixed, a different exception kept occurring (javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target), which could only be fixed by configuring the machine on which the server runs. So, the only possible solution was to access the SourceCodeLoaderServlet functionality directly, by invoking its methods, without making a new connection.