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

works on SSL