Sahih Bukhari | Volume 1 | Hadith Number 406

Narrated by Abu Said
The Prophet saw sputum on (the wall of) the mosque in the direction of the Qibla and scraped it off with gravel. Then he forbade Spitting in front or on the right, but allowed it on one's left or under one's left foot.