On line 460 of sharethis.module it checks for $_SERVER['HTTPS'] == 'on' to determine whether to use the secure Javascript include or not. The site I'm working on has ON as uppercase however, so this check fails.

I suggest a simple strtolower() before the check for it to work in both eventualities.
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') {

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jlockhart’s picture

Worked for me, site reports all secure now.

AL the X’s picture

Better would be to include the Javascript _without_ the protocol, e.g. <script src="//example.com/path/to/library.js"></script>, which bypasses the problem of checking (or normalizing) the $_SERVER["HTTPS"] value.

Gaofengzzz’s picture

Status: Active » Needs review
FileSize
590 bytes

@AL the X, thank you for your idea. But it is not work in my side.
I have created a patch as @Gwellin's code.

Gaofengzzz’s picture

Status: Needs review » Fixed

This patch has been commited. See 2349f54. Thank you

Automatically closed -- issue fixed for 2 weeks with no activity.