detecting redirect loops with http client