Sometimes the function flow changes from the normal request-handling process. This change happens during internal redirects, restarts, and URI translation functions.
An example of an internal redirect is a servlet include or forward. Because there is no exposed NSAPI function to handle an internal redirect, when an internal redirect occurs, the request structure is copied into rq->orig_rq.
A restart occurs when a REQ_RESTART is returned from a PathCheck or Service function, for example, when a CGI is redirected using a relative path.
On a restart, much of the request is cleared. Some elements of the HTTP request (rq->reqpb), the server’s “working” variables (rq->vars), and response headers (rq->srvhdrs) are cleared. The method, protocol, and clf-request variables from rq->reqpb are saved. The saved variables are put back into the data structure. The new URI is inserted (if the new URI contains a query string in , that too is inserted) into rq->reqpb. The parameter rq->rq_attr.req_restarted is set to 1.
At times you might need to find the physical path for a URI without actually running a request. The function request_translate_uri creates a new request structure puts the structure through the AuthTrans and NameTrans stages to get the physical path. Thereafter, the new request is freed.