Fix redirect detection for HTTPS -> HTTPS redirect loops

Fixes http://cdt.org & closes issue #289

Signed-off-by: Nick Semenkovich \<semenko@alum.mit.edu\>