Section 22. The proprietors of an incorporated bridge may make by-laws to prohibit persons from riding or driving horses over such bridge at a rate faster than a walk; and may affix penalties not exceeding two dollars for each offence, to be recovered to the use of the corporation.