Fix redirect detection for HTTPS -> HTTPS redirect loops

Fixes http://cdt.org & closes issue #289

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Merge pull request #295 from semenko/fix-redirect-bug

Fix redirect detection for HTTPS -> HTTPS redirect loops