The officer or person executing the governor's warrant of arrest, or the agent of the demanding state to whom the prisoner has been delivered, when necessary, may confine the prisoner in the jail in any county or city through which he may pass. The keeper of the jail must receive and safely keep the prisoner until the officer or person having charge of him is ready to proceed on his route, such person being chargeable with the expense of keeping. The officer or agent of a demanding state to whom a prisoner has been delivered following extradition proceedings in another state, or to whom a prisoner has been delivered after waiving extradition in such other state, and who is passing through this state with the prisoner for the purpose of immediately returning the prisoner to the demanding state, when necessary, may confine the prisoner in the jail of any county or city through which he may pass. The keeper of the jail must receive and safely keep the prisoner until the officer or agent having charge of him is ready to proceed on his route, such officer or agent, however, being chargeable with the expense of keeping; but the officer or agent shall produce and show to the keeper of the jail satisfactory written evidence of the fact that he is actually transporting such 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.