§ 1313. Remand of party
If the time during which such party may be legally detained in custody has not expired, the court shall remand such party if it appears that he is legally detained in custody— (1) by virtue of process issued by a court or judge in a case where such court or judge has jurisdiction; or (2) […]
§ 1314. Grounds for discharge of prisoner
If it appears on the return of the writ that the prisoner is in custody by virtue of process from any court or judge or officer thereof, such prisoner may be discharged in any of the following cases, subject to the restriction of section 1313 of this title: (1) When the jurisdiction of such court […]
§ 1315. Defect of form in warrant of commitment
If any person is committed to prison, or is in custody of any officer on any criminal charge, by virtue of any warrant of commitment of a judge, such person shall not be discharged on the ground of any mere defect of form in the warrant of commitment.
§ 1316. Procedure on commitment for criminal offense
If it appears to the court, by affidavit or otherwise, or upon the inspection of the process or warrant of commitment, and such other papers in the proceedings as may be shown to the court, that the party is guilty of a criminal offense, or ought not to be discharged, although the charge is defective […]
§ 1317. Writ for person committed on criminal charge
Any person who has been committed on a criminal charge may be brought before a judge on a writ of habeas corpus, if the writ issues out of the proper court.
§ 1308. Return
(a) The person upon whom the writ is served shall state in his return, plainly and unequivocally— (1) whether he has or has not the party in his custody or under his power or restraint; and (2) if he has the party in his custody or power, or under his restraint, the authority and cause […]
§ 1309. Production of body
The person or officer on whom the writ is served shall bring the body of the party in his custody or under restraint, according to the command of the writ.
§ 1310. Hearing and examination of return and other matters
Immediately after the return, the court shall proceed to hear and examine the return, and such other matters as may be properly submitted to its hearing and consideration.
§ 1311. Procedure for hearing
The party brought before the court on the return of the writ may deny or controvert any of the material facts or matters set forth in the return, or except to the sufficiency thereof, or allege any fact to show either that his imprisonment or detention is unlawful, or that he is entitled to his […]
§ 1312. Discharge from custody or restraint
If no legal cause is shown for such imprisonment or restraint, or for the continuation thereof, the court shall discharge such party from the custody or restraint under which he is held.