* bzrlib/transport/http/_urllib.py: (HttpTransport_urllib.has): Ignores 302 error code, it is already handled.
* bzrlib/transport/http/_pycurl.py: (PyCurlTransport.has): Set headers acquisition. Pass headers to _curl_perform. Ignores 302 error code, it is already handled. (PyCurlTransport._get_full, PyCurlTransport._get_ranged): Pass headers to _curl_perform. (PyCurlTransport._post): Pass headers to _curl_perform. (PyCurlTransport._set_curl_options): Do not follow redirections anymore. (PyCurlTransport._curl_perform): Handle redirections by raising
* bzrlib/tests/test_http.py: (TestHTTPRedirections): Simplified. (TestHTTPRedirections_pycurl): New class.
* bzrlib/tests/test_bzrdir.py: (TestHTTPRedirectionLoop, TestHTTPRedirections_urllib, TestHTTPRedirections_pycurl): New classes to test redirection loops when opening bzrdirs.
* bzrlib/tests/HTTPTestUtil.py: (HTTPServerRedirecting.redirect_to, HTTPServerRedirecting.redirected_to_address): New methods.