When from sickness or infirmity the prisoner cannot without danger be brought before the court or judge before whom the writ is made returnable the respondent may state that fact in the return, verifying the same by oath. If satisfied of the truth of such allegation and the return is otherwise sufficient, the court or judge shall proceed to dispose of the matter. The prisoner may appear by attorney and plead to the return. If it appears that the prisoner is illegally imprisoned the court or judge shall order discharge forthwith; but if it appears that the person is legally imprisoned and is not entitled to bail all further proceedings thereon shall cease.
Wis. Stat. § 782.29