OFHTTPClient: Improve redirection checking logic