Exit handler

Purpose: Exit current request processing.

 exit-handler [ <request status> ]

Exits current request by transferring control directly after the top-level request dispatcher. If there is an after-handler, it will still execute, unless exit-handler is called from before-handler.

<request status> number is a request status returned to the caller; if not specified, then it's the value specified in the last executed exit-status statement; if none executed in the request, then it's 0.
Examples
Returning status of 20:
 begin-handler /req-handler public
     ...
     exit-status 20
     ...
     exit-handler
     ...
 end-handler

Returning status of 0:
 begin-handler /req-handler public
     ...
     exit-handler
     ...
 end-handler

Returning status of 10:
 begin-handler /req-handler public
     ...
     exit-handler 10
     ...
 end-handler



Copyright (c) 2019-2025 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.