No confession made by any person whilst he is in the custody of a police-officer, unless it be made in the immediate presence of a Magistrate, shall be proved as against such person.
Explanation - In this section "Magistrate" does not include the head of a village discharging magisterial functions in the Presidency of Fort St. George or elsewhere, unless such headman is a Magistrate exercising the powers of a Magistrate under the Code of Criminal Procedure,1898 (V of 1898).