That was often done in the American west! Simon Kenton in early Kentucky, Christopher Carson ("Kit") in the southwest, mountain man Jedediah Smith were all captured and had to run what was called "the gauntlet" naked -- for their lives. Others too. It was NOT fiction!!
Art Thieme