| Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A89852-02 |
|
UTL_HTTP , 29 of 59
This procedure sets the maximum number of times UTL_HTTP follows the HTTP redirect instruction in the HTTP response to this request in the GET_RESPONSE function.
If max_redirects is set to a positive number, GET_RESPONSE will automatically follow the redirected URL for the HTTP response status code 301, 302, and 307 for the HTTP HEAD and GET methods, and 303 for all HTTP methods, and retry the HTTP request (the request method will be changed to HTTP GET for the status code 303) at the new location. It follows the redirection until the final, non-redirect location is reached, or an error occurs, or the maximum number of redirections has been reached (to prevent an infinite loop). The url and method fields in the REQ record are updated to the last redirected URL and the method used to access the URL. Set the maximum number of redirects to zero to disable automatic redirection.
Use this procedure to change the maximum number of redirections a request inherits from the session default setting.
UTL_HTTP.set_follow_redirect(r IN OUT NOCOPY req, max_redirects IN PLS_INTEGER DEFAULT 3);
Table 78-30 shows the parameters for the SET_FOLLOW_REDIRECT procedure.
| Parameter | Description |
|---|---|
r (IN/OUT) |
The HTTP request |
max_redirects (IN) |
The maximum number of redirects. Set to zero to disable redirects. |
The SET_FOLLOW_REDIRECT procedure must be called before GET_RESPONSE for any redirection to take effect.
|
|
![]() Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|