I have a web service written in Perl/CGI which I place on different servers including local where I do development.
Production ones have https certified connection for login/registration.
How can I check that https is open automatically in order to place right action URL in the login form (HTTPS://myservice.... instead of a regular one HTTP://.....)?