1. Pending an appeal from the final decision of any court or judge declining to grant the writ of habeas corpus, the custody of the prisoner shall not be disturbed.

2. Pending an appeal from the final decision of any court or judge discharging the writ after it has been issued, the prisoner shall be remanded to the custody from which he was taken by the writ, or shall, for good cause shown, be detained in custody of the court or judge, or be enlarged upon recognizance as hereinafter provided.

3. Pending an appeal from the final decision of any court or judge discharging the prisoner, he shall be enlarged upon recognizance, with surety, for appearance to answer the judgment of the Appellate Court, except where, for special reasons, sureties ought not to be required.