works on SSL - take 2
Merge pull request #2 from paulirish/patch-2

works on SSL - take 2