Fix redirect loop detection; simplify http client plugins