(a) The officer or persons executing the governor's warrant of arrest, or the agent of the demanding state to whom the prisoner may have been delivered may, when necessary, confine the prisoner in a jail in a political subdivision, judicial district, or city of this state through which the officer or person may pass. The keeper of the jail shall receive and safely keep the prisoner until the officer or person having charge of the prisoner is ready to proceed. The officer or person is chargeable with the expense of keeping.
(b) The officer or agent of a demanding state to whom a prisoner may have been delivered following extradition proceedings in another state, or to whom a prisoner may have been delivered after waiving extradition in the other state, and who is passing through this state with a prisoner for the purpose of immediately returning that prisoner to the demanding state may, when necessary, confine the prisoner in a jail in a political subdivision, judicial district, or city of this state through which the officer or agent may pass. The keeper of the jail shall receive and safely keep the prisoner until the officer or agent having charge of the prisoner is ready to proceed. The officer or agent is chargeable with the expense of keeping. The officer or agent shall produce and show to the keeper of the jail satisfactory written evidence of the fact that the officer or agent is actually transporting the prisoner to the demanding state after a requisition by the executive authority of the demanding state. The prisoner shall not be entitled to demand a new requisition while in this state.