To what habeas corpus extends.
Section 525
SEC. 525. To what habeas corpus extends. — The writ of habeas corpus shall extend to all cases of illegal confinement or detention by which any person is deprived of his liberty, or by which the rightful custody of any person is withheld from the person entitled thereto, except in cases expressly excepted.