#424. Added logic to check the header first.  If the header isn't there,
it checks the isSecure() method of the request.  Otherwise, it commences
a redirect.
(cherry picked from commit e82f8af129ba07c598e2a0b2859971955f18d2cd)