Section 20. The officer or other person executing the governor's warrant of arrest, or the agent of the demanding state to whom the prisoner shall have been delivered, may when necessary confine the prisoner in a jail or other place of detention in any county, city or town through which he may pass; and the keeper of such jail or place of detention shall receive and safely keep the prisoner until the officer or person having charge of him is ready to proceed on his journey, such officer or person being chargeable with the expense of keeping.
The officer or agent of a demanding state to whom a prisoner shall have been delivered following interstate rendition proceedings in another state, or to whom a prisoner shall have been delivered after waiving interstate rendition in another state, and who is passing through this commonwealth with such a prisoner for the purpose of immediately returning such prisoner to the demanding state may, when necessary, confine the prisoner in a jail or other place of detention in any county, city or town through which he may pass; and the keeper of such jail or other place of detention shall receive and safely keep the prisoner until the officer or agent having charge of him is ready to proceed on his journey, such officer or agent being chargeable with the expense of keeping; provided, that such officer or agent shall produce and show to such keeper satisfactory written evidence that he is actually transporting such prisoner to the demanding state pursuant to a requisition by the executive authority thereof, or that such prisoner has waived interstate rendition. No prisoner being transported pursuant to such a requisition or waiver shall be entitled to demand a new requisition while in this commonwealth.