Situation
I enabled SSL for one of our Force.com Sites. The website is available and all SSL certs are working fine.
I noticed that SSL doesn't work in case you are using getContent(). As you can see below I implemented a APEX Class:
public with sharing class SalesforceTestCase {
public String content {get; set;}
public SalesforceTestCase() {
try
{
PageReference pr = new PageReference('/apex/MyPage');
content = pr.getContent().toString();
}
catch(Exception e)
{
content = e.getMessage();
}
}
}
And in addition a Visualforce page to show the variable content.
<apex:page controller="SalesforceTestCase" showHeader="false" sidebar="false" standardStylesheets="false" >
{!content}
</apex:page>
Test case
It works fine without HTTPS:
http://www.die-akademie.de/SalesforceTestCase
But in the moment you are using HTTPS the site fails:
https://www.die-akademie.de/SalesforceTestCase
Question
How can I fix this issue? Does it have anything to do with getContent()?