Issue:
I have solved this kind of issue in my .htaccess, it has the downside that it always redirects to https also not behind a S2 firewall, which is ok in my case since I only have the login form publicly available and I want the credentials to be sent via https
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule (.*) https://%{SERVER_NAME}/$1 [redirect=permanent,last]