1. Исходники на IdHTTP смотри в модуле IdHTTP.pas (вроде в билдере лежат паскальные исходники).
2. Самое интересное находится в методе TIdCustomHTTP.DoRequest, TIdHTTPProtocol.ProcessResponse. Собственно в твоем случае exception возникает именно в методе ProcessResponse.
3. Установи в True свойство HandleRedirects, ну и свойство RedirectMax должно быть не меньше редиректов. Вот что пишет Борландский хелп по поводу HandleRedirects:
TIdHTTP.HandleRedirects
Indicates if the HTTP client can handle redirections to an alternate resource location.
property HandleRedirects: Boolean;
Description
HandleRedirects is a published Boolean property in TIdHTTP, and indicates if the HTTP client should handle redirects in a response from the HTTP server. Redirects are indicated by the HTTP Response having a ResponseCode in the range 300 to 307, and requires further action needs by the HTTP Client to fulfill the request.
Redirection ResponseCodes include the following:
300 - Multiple Choices. The request can be fulfilled with one of a set of resources, each with its own specific location. The HTTP client can select a preferred representation and redirect its request to that location.
301 - Moved Permanently. The requested resource has been assigned a new permanent URI and any future references to this resource should use the new location specified in the Response.
302 - Found. The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client should continue to use the URI in the Request for future requests.
304 - Not Modified. If the client has performed a conditional GET request and access is allowed, but the document has not been modified, the server should respond with this status code. The 304 response should not contain a message body, and is always terminated by the first empty line after the header fields, and must include a Date header.
305 - Use Proxy. The requested resource must be accessed through the proxy given by the Location header in the HTTP Response containing the URI of the Proxy.
307 - Temporary Redirect. The requested resource resides temporarily under a different URI. Since the redirection may be altered on occasion, the HTTP client should continue to use the URI in the RequestI for future requests.
HandleRedirects is used with RedirectMaximum in DoRequest to detect and prevent infinite redirection loops, by limiting the number of active redirections for the client to the value specified in RedirectMaximum.
When HandleRedirects is True, the HTTP Client will trigger the OnRedirect event handler to determine if the client can accept the redirection location found in an HTTP response. When accepted, the redirect causes a new HTTP request with the new location to be issued to fulfill the original request.
When HandleRedirects is False, the OnRedirect event handler will be triggered, and an EIdProtocolReplyError exception will be raised when the redirect cannot be handled by the HTTP client.
The default value for HandleRedirects is Id_TIdHTTP_HandleRedirects, as assigned in the Create constuctor.