It is Aarne-Thompson type 531. Other tales of this type include The Firebird and Princess Vasilisa, Ferdinand the Faithful and Ferdinand the Unfaithful, King Fortunatus's Golden Wig, and The Mermaid and the Boy. Another, literary variant is Madame d'Aulnoy's La Belle aux cheveux d'or, or The Story of Pretty Goldilocks.
Corvetto served a king loyally and was favored by him. Envious fellow servants tried to slander him, but failed. An ogre lived nearby, with a magnificent horse, and finally the servants said that the king should send Corvetto to steal it. Corvetto went, and jumped on the horse. It shouted to its master, who chased after with wild animals, but Corvetto rode it off. The king was even more pleased, and the other servants told him to send Corvetto after the ogre's tapestry. Corvetto went, hid under the ogres' bed, and in the night stole both the tapestries and the counterpane from the bed (causing the ogre and ogress to argue about who hogged them). He dropped them from a window and fled back to the king.
The servants then persuaded him to send Corvetto for the entire palace. He went and talked with the ogress, offering to help her. She asked him to split wood for her. He used the axe on her neck. Then he dug a deep pit in the doorway and covered it. He lured the ogre and his friends into it, stoned them to death, and gave the king the palace.