§17‑33. When party discharged.
If no legal cause is shown forsuch imprisonment or restraint, or for the continuance thereof, the court orjudge shall discharge the party from the custody or restraint under which he isheld. But if it appears on the return to the writ that the party is in custodyby virtue of civil process from any court legally constituted, or issued by anyofficer in the course of judicial proceedings before him, authorized by law,such party can be discharged only in one of the following cases:
(1) Where thejurisdiction of such court or officer has been exceeded, either as to matter,place, sum or person.
(2) Where, though theoriginal imprisonment was lawful, yet by some act, omission or event, which hastaken place afterwards, the party has become entitled to be discharged.
(3) Where the process isdefective in some matter of substance required by law, rendering such processvoid.
(4) Where the process,though in proper form, has been issued in a case not allowed by law.
(5) Where the person,having the custody of the party under such process, is not the person empoweredby law to detain him.
(6) Where the process isnot authorized by any judgment, order or decree of any court, nor by anyprovision of law. (1868‑9, c. 116, s. 20; Code, s. 1645; Rev., s.1847; C.S., s. 2235.)