It is the duty of every sheriff or other officer upon whom a writ of habeas corpus is served, whether such writ is directed to the sheriff or officer or not, upon payment or tender of the fees allowed by law, and the delivery or tender of the undertaking described in ORS 34.440, to obey and return the writ according to the exigency thereof; and it is the duty of every other person upon whom the writ is served, having the custody of the person for whose benefit it is issued, to obey and return it in like manner, without requiring the payment of any fees, unless the payment of such fees has been required by the court or judge allowing such writ.
ORS 34.490