Any person disobeying the writ of habeas corpus shall also be liable to a civil action at the suit of the party detained, and shall pay in such suit fifty dollars for each day of illegal detention and restraint, after service of the writ. It shall be deemed that a person has disobeyed the writ who detains a prisoner a longer time than three days after service thereof, unless where further time is allowed in the writ for making the return thereto.