Indicates the number of redirects encountered in the last request for the HTTP client.
property RedirectCount: Integer;
RedirectCount is a read-only Integer property that indicates the number of redirects encountered in the last request for the HTTP client.
The value in RedirectCount is always set to 0 (zero) prior to handling a new HTTP request in methods like Get and Post. RedirectCount is maintained in the ProcessResponse method for the HTTP protocol handler when an HTTP redirect response code is encountered.
Redirects are indicated by the HTTP Response having a response code in the range 300 to 307, and requires further action by the HTTP Client to fulfill the request.
Redirection Response codes include the following:
Code |
Meaning |
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. |
Use HandleRedirects and RedirectMaximum to limit the number of active redirections for the client to the values specified.
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.
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
|
Post feedback to the Indy Docs Newsgroup.
|