This is the full text of the Habeas Corpus law. The year given is 1679, and I know the concept goes back several hundred years before then. This is an ancient concept in European culture, and for GW Bush to throw it away just because it smells bad to him is ridiculous. Why did Congress go along with it?
The text of the law is very interesting, as it clearly is meant to avoid abuses by government officials in the form of holding prisoners excessively long without just cause.