Whenever the executive authority of any State or Territory demands any person as a fugitive from justice, of the executive authority of any State, District, or Territory to which such person has fled, and produces a copy of an indictment found or an affidavit made before a magistrate of any State or Territory, charging the person demanded with having committed treason, felony, or other crime, certified as authentic by the governor or chief magistrate of the State or Territory from whence the person so charged has fled, the executive authority of the State, District, or Territory to which such person has fled shall cause him to be arrested and secured, and notify the executive authority making such demand, or the agent of such authority appointed to receive the fugitive, and shall cause the fugitive to be delivered to such agent when he shall appear. If no such agent appears within thirty days from the time of the arrest, the prisoner may be discharged.