§ 17-32.  Proceedings on return; facts examined; summary hearing of issues.

The court or judge before whom the party is brought on a writ of habeas corpus shall, immediately after the return thereof, examine into the facts contained in such return, and into the cause of the confinement or restraint of such party, whether the same has been  upon commitment for any criminal or supposed criminal matter or not; and if issue be taken upon the material facts in the return, or other facts are alleged to show that the imprisonment or detention is illegal, or that the party imprisoned is entitled to his discharge, the court or judge shall proceed, in a summary way, to hear the allegations and proofs on both sides, and to do what to justice appertains in delivering, bailing or remanding such party. (1868-9, c. 116, s. 19; Code, s. 1644; Rev., s. 1846; C.S., s. 2234.)